forked from yarpc/yarpc-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
client.go
51 lines (43 loc) · 1.12 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Code generated by thriftrw-plugin-yarpc
// @generated
package extendonlyclient
import (
yarpc "go.uber.org/yarpc"
transport "go.uber.org/yarpc/api/transport"
thrift "go.uber.org/yarpc/encoding/thrift"
baseserviceclient "go.uber.org/yarpc/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/common/baseserviceclient"
reflect "reflect"
)
// Interface is a client for the ExtendOnly service.
type Interface interface {
baseserviceclient.Interface
}
// New builds a new client for the ExtendOnly service.
//
// client := extendonlyclient.New(dispatcher.ClientConfig("extendonly"))
func New(c transport.ClientConfig, opts ...thrift.ClientOption) Interface {
return client{
c: thrift.New(thrift.Config{
Service: "ExtendOnly",
ClientConfig: c,
}, opts...),
Interface: baseserviceclient.New(
c,
append(
opts,
thrift.Named("ExtendOnly"),
)...,
),
}
}
func init() {
yarpc.RegisterClientBuilder(
func(c transport.ClientConfig, f reflect.StructField) Interface {
return New(c, thrift.ClientBuilderOptions(c, f)...)
},
)
}
type client struct {
baseserviceclient.Interface
c thrift.Client
}