Documentation
¶
Index ¶
- func NewOptions() *options
- type Option
- func WithAddress(addr string) Option
- func WithAfterStart(fn ...func() error) Option
- func WithAfterStop(fn ...func() error) Option
- func WithBeforeStart(fn ...func() error) Option
- func WithBeforeStop(fn ...func() error) Option
- func WithCACert(path string) Option
- func WithCert(path string) Option
- func WithContext(ctx context.Context) Option
- func WithDB(dialect string, args ...interface{}) Option
- func WithGRPCServerOpts(opts ...grpc.ServerOption) Option
- func WithKey(path string) Option
- func WithName(name string) Option
- func WithReflection(r bool) Option
- func WithRegistry(registry registry.Registry) Option
- func WithSecure(s bool) Option
- func WithStreamClientInterceptor(i ...grpc.StreamClientInterceptor) Option
- func WithStreamServerInterceptor(i ...grpc.StreamServerInterceptor) Option
- func WithSubscriberInterceptor(w ...interface{}) Option
- func WithTLSConfig(conf *tls.Config) Option
- func WithUnaryClientInterceptor(i ...grpc.UnaryClientInterceptor) Option
- func WithUnaryServerInterceptor(i ...grpc.UnaryServerInterceptor) Option
- func WithVersion(version string) Option
- type Options
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptions ¶
func NewOptions() *options
Types ¶
type Option ¶
type Option func(*options)
func WithAfterStart ¶
func WithAfterStop ¶
func WithBeforeStart ¶
func WithBeforeStop ¶
func WithCACert ¶
func WithContext ¶
WithContext specifies a context for the service. Can be used to signal shutdown of the service. Can be used for extra option values.
func WithGRPCServerOpts ¶
func WithGRPCServerOpts(opts ...grpc.ServerOption) Option
func WithReflection ¶
func WithRegistry ¶
func WithSecure ¶
func WithStreamClientInterceptor ¶
func WithStreamClientInterceptor(i ...grpc.StreamClientInterceptor) Option
func WithStreamServerInterceptor ¶
func WithStreamServerInterceptor(i ...grpc.StreamServerInterceptor) Option
func WithSubscriberInterceptor ¶
func WithSubscriberInterceptor(w ...interface{}) Option
WithSubscriberInterceptor adds subscriber interceptors to the options passed into the server
func WithTLSConfig ¶
func WithUnaryClientInterceptor ¶
func WithUnaryClientInterceptor(i ...grpc.UnaryClientInterceptor) Option
func WithUnaryServerInterceptor ¶
func WithUnaryServerInterceptor(i ...grpc.UnaryServerInterceptor) Option
WithUnaryServerInterceptor adds unary Wrapper interceptors to the options passed into the server
func WithVersion ¶
type Options ¶
type Options interface { Context() context.Context Name() string Version() string Address() string Reflection() bool CACert() string Cert() string Key() string TLSConfig() *tls.Config Secure() bool Registry() registry.Registry DB() *gorm.DB BeforeStart() []func() error AfterStart() []func() error BeforeStop() []func() error AfterStop() []func() error ServerOpts() []grpc.ServerOption ServerInterceptors() []grpc.UnaryServerInterceptor StreamServerInterceptors() []grpc.StreamServerInterceptor ClientInterceptors() []grpc.UnaryClientInterceptor StreamClientInterceptors() []grpc.StreamClientInterceptor Defaults() }
Click to show internal directories.
Click to hide internal directories.