Documentation ¶
Index ¶
- func NewOptions() *options
- type Middleware
- type Option
- func NewFlagSet() (*pflag.FlagSet, 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 WithClientInterceptors(i ...interceptors.ClientInterceptors) Option
- func WithContext(ctx context.Context) Option
- func WithCors(opts cors.Options) Option
- func WithGRPCServerOpts(opts ...grpc.ServerOption) Option
- func WithGRPCWeb(b bool) Option
- func WithGRPCWebOpts(opts ...grpcweb.Option) Option
- func WithGRPCWebPrefix(prefix string) Option
- func WithGateway(fn RegisterGatewayFunc) Option
- func WithGatewayOpts(opts ...runtime.ServeMuxOption) Option
- func WithGatewayPrefix(prefix string) Option
- func WithHealth(h bool) Option
- func WithInterceptors(i ...interceptors.Interceptors) Option
- func WithKey(path string) Option
- func WithListener(lis net.Listener) Option
- func WithMiddlewares(m ...Middleware) Option
- func WithMux(mux ServeMux) Option
- func WithName(name string) Option
- func WithReactUI(fs fs.FS, subpath string) Option
- func WithReflection(r bool) Option
- func WithRegistry(registry registry.Registry) Option
- func WithSecure(s bool) Option
- func WithServerInterceptors(i ...interceptors.ServerInterceptors) 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 RegisterGatewayFunc
- type ServeMux
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptions ¶
func NewOptions() *options
Types ¶
type Middleware ¶
type Middleware = alice.Constructor
type Option ¶
type Option func(*options)
func NewFlagSet ¶
func WithAfterStart ¶
func WithAfterStop ¶
func WithBeforeStart ¶
func WithBeforeStop ¶
func WithCACert ¶
func WithClientInterceptors ¶
func WithClientInterceptors(i ...interceptors.ClientInterceptors) Option
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 WithGRPCWeb ¶
func WithGRPCWebOpts ¶
func WithGRPCWebPrefix ¶
func WithGateway ¶
func WithGateway(fn RegisterGatewayFunc) Option
func WithGatewayOpts ¶
func WithGatewayOpts(opts ...runtime.ServeMuxOption) Option
func WithGatewayPrefix ¶
func WithHealth ¶
func WithInterceptors ¶
func WithInterceptors(i ...interceptors.Interceptors) Option
func WithListener ¶
WithListener specifies a listener for the service. It can be used to specify a custom listener. This will override the WithAddress and WithTLSConfig options
func WithMiddlewares ¶
func WithMiddlewares(m ...Middleware) Option
func WithReactUI ¶
WithReactUI add static single page app serving to the http server subpath is the path in the read-only file embed.FS to use as root to serve static content
func WithReflection ¶
func WithRegistry ¶
func WithSecure ¶
func WithServerInterceptors ¶
func WithServerInterceptors(i ...interceptors.ServerInterceptors) Option
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 Health() bool CACert() string Cert() string Key() string TLSConfig() *tls.Config Secure() bool Registry() registry.Registry 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 Cors() cors.Options Mux() ServeMux GRPCWeb() bool GRPCWebPrefix() string GRPCWebOpts() []grpcweb.Option Gateway() bool GatewayPrefix() string GatewayOpts() []runtime.ServeMuxOption Default() }
type RegisterGatewayFunc ¶
Click to show internal directories.
Click to hide internal directories.