Documentation
¶
Overview ¶
Package builder implements the functions, types, and interfaces for the module.
Package service implements the functions, types, and interfaces for the module.
Package builder implements the functions, types, and interfaces for the module.
Package service implements the functions, types, and interfaces for the module.
Package builder implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- Variables
- func NewClientTLSConfig(cfg *configv1.TLSConfig, opts ...TLSOption) (*tls.Config, error)
- func NewServerTLSConfig(cfg *configv1.TLSConfig, opts ...TLSOption) (*tls.Config, error)
- type Builder
- type EndpointFunc
- type Factory
- type GRPCClient
- type GRPCClientOption
- type GRPCRegister
- type GRPCServer
- type GRPCServerOption
- type HTTPClient
- type HTTPClientOption
- type HTTPRegister
- type HTTPServer
- type HTTPServerOption
- type Option
- type OptionSetting
- type Register
- type RegisterGRPCClientFunc
- type RegisterGRPCServerFunc
- type RegisterHTTPClientFunc
- type RegisterHTTPServerFunc
- type Service
- type TLSOption
Constants ¶
const DefaultTimeout = 5 * time.Second
Variables ¶
var DefaultServiceBuilder = &factory{}
DefaultServiceBuilder is the default instance of the builder builder.
var (
ErrServiceNotFound = errors.New("service not found")
)
Functions ¶
func NewClientTLSConfig ¶
Types ¶
type Builder ¶ added in v0.1.15
Builder is an interface that defines a method for registering a builder builder.
func NewBuilder ¶ added in v0.1.16
func NewBuilder() Builder
type EndpointFunc ¶ added in v0.1.0
type Factory ¶ added in v0.1.15
type Factory interface {
NewGRPCServer(*configv1.Service, ...OptionSetting) (*GRPCServer, error)
NewHTTPServer(*configv1.Service, ...OptionSetting) (*HTTPServer, error)
NewGRPCClient(context.Context, *configv1.Service, ...OptionSetting) (*GRPCClient, error)
NewHTTPClient(context.Context, *configv1.Service, ...OptionSetting) (*HTTPClient, error)
}
Factory is an interface that defines a method for creating a new builder.
type GRPCClientOption ¶ added in v0.0.4
type GRPCClientOption = transgrpc.ClientOption
GRPCClientOption define the gRPC client options
type GRPCRegister ¶ added in v0.1.31
type GRPCRegister interface {
RegisterGRPCServer(context.Context, *GRPCServer)
}
type GRPCServerOption ¶ added in v0.0.4
type GRPCServerOption = transgrpc.ServerOption
GRPCServerOption define the gRPC server options
type HTTPClientOption ¶ added in v0.0.4
type HTTPClientOption = transhttp.ClientOption
HTTPClientOption define the HTTP client options
type HTTPRegister ¶ added in v0.1.31
type HTTPRegister interface {
RegisterHTTPServer(context.Context, *HTTPServer)
}
type HTTPServerOption ¶ added in v0.0.4
type HTTPServerOption = transhttp.ServerOption
HTTPServerOption define the HTTP server options
type Option ¶ added in v0.1.0
type Option struct {
// contains filtered or unexported fields
}
Option represents a set of configuration options for a builder.
type OptionSetting ¶ added in v0.1.0
type OptionSetting = func(option *Option)
func WithGRPC ¶ added in v0.1.0
func WithGRPC(option ...grpc.OptionSetting) OptionSetting
func WithHTTP ¶ added in v0.1.0
func WithHTTP(option ...http.OptionSetting) OptionSetting
type Register ¶ added in v0.1.31
type Register interface {
GRPCRegister
HTTPRegister
}
type RegisterGRPCClientFunc ¶ added in v0.1.31
type RegisterGRPCClientFunc = func(c *GRPCClient)
RegisterGRPCClientFunc register a gRPC client
type RegisterGRPCServerFunc ¶ added in v0.1.31
type RegisterGRPCServerFunc = func(s *GRPCServer)
RegisterGRPCServerFunc register a gRPC server
type RegisterHTTPClientFunc ¶ added in v0.1.31
type RegisterHTTPClientFunc = func(c *HTTPClient)
RegisterHTTPClientFunc register a HTTP client
type RegisterHTTPServerFunc ¶ added in v0.1.31
type RegisterHTTPServerFunc = func(s *HTTPServer)
RegisterHTTPServerFunc register a HTTP server
Directories
¶
| Path | Synopsis |
|---|---|
|
Package grpc implements the functions, types, and interfaces for the module.
|
Package grpc implements the functions, types, and interfaces for the module. |
|
Package http implements the functions, types, and interfaces for the module.
|
Package http implements the functions, types, and interfaces for the module. |
|
Package selector implements the functions, types, and interfaces for the module.
|
Package selector implements the functions, types, and interfaces for the module. |