Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents the configuration for a gRPC client.
func NewClient ¶
func NewClient(opts ...ClientOption) (*Client, error)
NewClient initializes a new gRPC client with the provided options.
type ClientOption ¶
type ClientOption func(c *Client)
ClientOption defines an option for configuring the Client.
func ClientInsecure ¶
func ClientInsecure() ClientOption
ClientInsecure returns a ClientOption that configures the client to use insecure connections.
func ClientWithPickerBuilder ¶
func ClientWithPickerBuilder(name string, b base.PickerBuilder) ClientOption
ClientWithPickerBuilder returns a ClientOption that sets a custom picker builder for load balancing.
func ClientWithResolver ¶
func ClientWithResolver(registry registry.Registry, timeout time.Duration) ClientOption
ClientWithResolver returns a ClientOption that configures the client to use a specific registry for service resolution.
type ResolverBuilder ¶ added in v0.0.4
type ResolverBuilder struct {
// contains filtered or unexported fields
}
ResolverBuilder constructs a grpcResolver with registry and timeout settings.
func NewResolverBuilder ¶ added in v0.0.4
func NewResolverBuilder(registry registry.Registry, opts ...ResolverOptions) (*ResolverBuilder, error)
NewResolverBuilder creates a new ResolverBuilder and applies any additional options.
func (*ResolverBuilder) Build ¶ added in v0.0.4
func (b *ResolverBuilder) Build(target resolver.Target, clientConn resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error)
Build constructs a grpcResolver for a given target and client connection with additional resolver build options.
func (*ResolverBuilder) Scheme ¶ added in v0.0.4
func (b *ResolverBuilder) Scheme() string
Scheme returns the scheme this builder is responsible for.
type ResolverOptions ¶ added in v0.0.4
type ResolverOptions func(r *ResolverBuilder)
ResolverOptions defines a functional option for configuring a ResolverBuilder.
func ResolverWithTimeout ¶ added in v0.0.4
func ResolverWithTimeout(timeout time.Duration) ResolverOptions
ResolverWithTimeout creates a ResolverOptions which sets a custom timeout for a ResolverBuilder.
type Server ¶
Server represents a gRPC server
type ServerOption ¶
type ServerOption func(s *Server)
func ServerWithGroup ¶
func ServerWithGroup(group string) ServerOption
ServerWithGroup sets the group for the server
func ServerWithRegisterTimeout ¶
func ServerWithRegisterTimeout(d time.Duration) ServerOption
ServerWithRegisterTimeout sets the register timeout for the server
func ServerWithRegistry ¶
func ServerWithRegistry(reg registry.Registry) ServerOption
ServerWithRegistry sets the registry for the server
func ServerWithWeight ¶
func ServerWithWeight(weight uint32) ServerOption
ServerWithWeight sets the weight for the server