go.uber.org/yarpc@v1.72.1/encoding/thrift/thriftrw-plugin-yarpc/internal/tests/common/emptyserviceclient/client.go (about)

     1  // Code generated by thriftrw-plugin-yarpc
     2  // @generated
     3  
     4  package emptyserviceclient
     5  
     6  import (
     7  	yarpc "go.uber.org/yarpc"
     8  	transport "go.uber.org/yarpc/api/transport"
     9  	thrift "go.uber.org/yarpc/encoding/thrift"
    10  	reflect "reflect"
    11  )
    12  
    13  // Interface is a client for the EmptyService service.
    14  type Interface interface {
    15  }
    16  
    17  // New builds a new client for the EmptyService service.
    18  //
    19  //	client := emptyserviceclient.New(dispatcher.ClientConfig("emptyservice"))
    20  func New(c transport.ClientConfig, opts ...thrift.ClientOption) Interface {
    21  	return client{
    22  		c: thrift.New(thrift.Config{
    23  			Service:      "EmptyService",
    24  			ClientConfig: c,
    25  		}, opts...),
    26  		nwc: thrift.NewNoWire(thrift.Config{
    27  			Service:      "EmptyService",
    28  			ClientConfig: c,
    29  		}, opts...),
    30  	}
    31  }
    32  
    33  func init() {
    34  	yarpc.RegisterClientBuilder(
    35  		func(c transport.ClientConfig, f reflect.StructField) Interface {
    36  			return New(c, thrift.ClientBuilderOptions(c, f)...)
    37  		},
    38  	)
    39  }
    40  
    41  type client struct {
    42  	c   thrift.Client
    43  	nwc thrift.NoWireClient
    44  }