Documentation
¶
Overview ¶
Package service implements the functions, types, and interfaces for the module.
Package service implements the functions, types, and interfaces for the module.
Package service implements the functions, types, and interfaces for the module.
Package service implements the functions, types, and interfaces for the module.
Index ¶
- Constants
- Variables
- type ClientGRPCFactory
- type ClientHTTPFactory
- type EndpointFunc
- type Factory
- type GRPCClient
- type GRPCClientOption
- type GRPCOption
- type GRPCServer
- type GRPCServerOption
- type GRPCServerRegister
- type HTTPClient
- type HTTPClientOption
- type HTTPOption
- type HTTPServer
- type HTTPServerOption
- type HTTPServerRegister
- type Options
- type RegisterGRPCClientFunc
- type RegisterGRPCServerFunc
- type RegisterHTTPClientFunc
- type RegisterHTTPServerFunc
- type ServerBuilder
- type ServerFactory
- type ServerOption
- type ServerRegister
- type Service
Constants ¶
const DefaultHostEnv = "HOST"
const DefaultTimeout = 5 * time.Second
Variables ¶
var DefaultServiceFactory = &factoryImpl{}
DefaultServiceFactory is the default instance of the buildImpl.
var (
ErrServiceNotFound = errors.New("service not found")
)
Functions ¶
This section is empty.
Types ¶
type ClientGRPCFactory ¶ added in v0.2.0
type ClientGRPCFactory interface {
New(context.Context, *configv1.Service, ...GRPCOption) (*GRPCClient, error)
}
type ClientHTTPFactory ¶ added in v0.2.0
type ClientHTTPFactory interface {
New(context.Context, *configv1.Service, ...HTTPOption) (*HTTPClient, error)
}
type EndpointFunc ¶ added in v0.1.0
type Factory ¶ added in v0.1.15
type Factory interface {
NewGRPCServer(*configv1.Service, ...GRPCOption) (*GRPCServer, error)
NewHTTPServer(*configv1.Service, ...HTTPOption) (*HTTPServer, error)
NewGRPCClient(context.Context, *configv1.Service, ...GRPCOption) (*GRPCClient, error)
NewHTTPClient(context.Context, *configv1.Service, ...HTTPOption) (*HTTPClient, error)
}
Factory is an interface that defines a method for creating a new buildImpl.
type GRPCClientOption ¶ added in v0.0.4
type GRPCClientOption = transgrpc.ClientOption
GRPCClientOption define the gRPC client options
type GRPCOption ¶ added in v0.1.56
GRPCOption is the type for gRPC option settings.
type GRPCServerOption ¶ added in v0.0.4
type GRPCServerOption = transgrpc.ServerOption
GRPCServerOption define the gRPC server options
type GRPCServerRegister ¶ added in v0.1.32
type GRPCServerRegister interface {
GRPCServer(context.Context, *GRPCServer)
}
type HTTPClientOption ¶ added in v0.0.4
type HTTPClientOption = transhttp.ClientOption
HTTPClientOption define the HTTP client options
type HTTPOption ¶ added in v0.1.56
HTTPOption is the type for HTTP option settings.
type HTTPServerOption ¶ added in v0.0.4
type HTTPServerOption = transhttp.ServerOption
HTTPServerOption define the HTTP server options
type HTTPServerRegister ¶ added in v0.1.32
type HTTPServerRegister interface {
HTTPServer(context.Context, *HTTPServer)
}
type Options ¶ added in v0.2.0
type Options struct {
// contains filtered or unexported fields
}
func (Options) ToGRPC ¶ added in v0.2.0
func (o Options) ToGRPC() GRPCOption
type RegisterGRPCClientFunc ¶ added in v0.1.31
type RegisterGRPCClientFunc = func(context.Context, *GRPCClient)
RegisterGRPCClientFunc register a gRPC client
type RegisterGRPCServerFunc ¶ added in v0.1.31
type RegisterGRPCServerFunc = func(context.Context, *GRPCServer)
RegisterGRPCServerFunc register a gRPC server
type RegisterHTTPClientFunc ¶ added in v0.1.31
type RegisterHTTPClientFunc = func(context.Context, *HTTPClient)
RegisterHTTPClientFunc register a HTTP client
type RegisterHTTPServerFunc ¶ added in v0.1.31
type RegisterHTTPServerFunc = func(context.Context, *HTTPServer)
RegisterHTTPServerFunc register a HTTP server
type ServerBuilder ¶ added in v0.2.0
type ServerBuilder interface {
factory.Registry[ServerFactory]
Build(string, *configv1.Service, ...ServerOption) (transport.Server, error)
}
func NewBuilder ¶ added in v0.1.16
func NewBuilder() ServerBuilder
type ServerFactory ¶ added in v0.2.0
type ServerOption ¶ added in v0.2.0
type ServerOption = func(o *Options)
func WithGRPC ¶ added in v0.1.0
func WithGRPC(opts ...GRPCOption) ServerOption
func WithHTTP ¶ added in v0.1.0
func WithHTTP(opts ...HTTPOption) ServerOption
type ServerRegister ¶ added in v0.1.32
type ServerRegister interface {
GRPCServerRegister
HTTPServerRegister
Server(context.Context, *GRPCServer, *HTTPServer)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package endpoint implements the functions, types, and interfaces for the module.
|
Package endpoint implements the functions, types, and interfaces for the module. |
|
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. |
|
Package service implements the functions, types, and interfaces for the module.
|
Package service implements the functions, types, and interfaces for the module. |