Documentation
¶
Overview ¶
Package grpc implements the functions, types, and interfaces for the module.
Package grpc implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- func NewClient(ctx context.Context, cfg *configv1.Service, options ...Option) (*grpc.ClientConn, error)
- func NewServer(cfg *configv1.Service, options ...Option) (*transgrpc.Server, error)
- type EndpointFunc
- type Option
- func WithClientOptions(opts ...transgrpc.ClientOption) Option
- func WithDiscovery(serviceName string, discovery registry.Discovery) Option
- func WithEndpointFunc(endpointFunc EndpointFunc) Option
- func WithHostIp(hostIp string) Option
- func WithMiddlewares(middlewares ...middleware.Middleware) Option
- func WithNodeFilter(filters ...selector.NodeFilter) Option
- func WithPrefix(prefix string) Option
- func WithServerOptions(opts ...transgrpc.ServerOption) Option
- type Options
Constants ¶
View Source
const (
Scheme = "grpc"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EndpointFunc ¶ added in v0.1.56
type Option ¶ added in v0.1.0
type Option = func(o *Options)
func WithClientOptions ¶ added in v0.1.25
func WithClientOptions(opts ...transgrpc.ClientOption) Option
func WithDiscovery ¶ added in v0.1.14
func WithEndpointFunc ¶ added in v0.1.14
func WithEndpointFunc(endpointFunc EndpointFunc) Option
func WithHostIp ¶ added in v0.1.15
func WithMiddlewares ¶ added in v0.1.14
func WithMiddlewares(middlewares ...middleware.Middleware) Option
func WithNodeFilter ¶ added in v0.1.0
func WithNodeFilter(filters ...selector.NodeFilter) Option
func WithPrefix ¶ added in v0.1.15
func WithServerOptions ¶ added in v0.1.25
func WithServerOptions(opts ...transgrpc.ServerOption) Option
type Options ¶ added in v0.1.56
type Options struct {
Prefix string
HostIp string
ServiceName string
Discovery registry.Discovery
NodeFilters []selector.NodeFilter
Middlewares []middleware.Middleware
EndpointFunc EndpointFunc
ClientOptions []transgrpc.ClientOption
ServerOptions []transgrpc.ServerOption
}
Click to show internal directories.
Click to hide internal directories.