Documentation ¶
Index ¶
- func RegisteAuthorizationProxyValidator(name string, handler proposal.SignatureHandler)
- func RegisteAuthorizationValidator(name string, handler proposal.UserinfoHandler)
- type GRPCServer
- type Option
- func WithCredential(credential credentials.TransportCredentials) Option
- func WithDisableMessageValitator() Option
- func WithEnforcementPolicy(enforcementPolicy *keepalive.EnforcementPolicy) Option
- func WithIgnoreFileDescriptor(fd protoreflect.FileDescriptor) Option
- func WithKeepAlive(keepalive *keepalive.ServerParameters) Option
- func WithProjectName(name string) Option
- func WithPrometheus(metrics func(http.Handler)) Option
- type RegisterEndpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisteAuthorizationProxyValidator ¶ added in v1.3.0
func RegisteAuthorizationProxyValidator(name string, handler proposal.SignatureHandler)
RegisteAuthorizationProxyValidator signature handler for interceptor options.authorization_proxy
func RegisteAuthorizationValidator ¶
func RegisteAuthorizationValidator(name string, handler proposal.UserinfoHandler)
RegisteAuthorizationValidator userinfo handler for interceptor options.authorization
Types ¶
type GRPCServer ¶ added in v1.3.0
type GRPCServer interface { Serve(lis net.Listener) error GracefulStop() // contains filtered or unexported methods }
GRPCServer grpc server
func New ¶
func New(logger *zap.Logger, notify proposal.NotifyHandler, register RegisterEndpoint, options ...Option) GRPCServer
New create a grpc server
type Option ¶
type Option func(*option)
Option some options for build a server
func WithCredential ¶
func WithCredential(credential credentials.TransportCredentials) Option
WithCredential setup credential for tls
func WithDisableMessageValitator ¶ added in v1.5.14
func WithDisableMessageValitator() Option
WithDisableMessageValitator ignore request message's validator
func WithEnforcementPolicy ¶
func WithEnforcementPolicy(enforcementPolicy *keepalive.EnforcementPolicy) Option
WithEnforcementPolicy setup enforcement policy
func WithIgnoreFileDescriptor ¶ added in v1.5.3
func WithIgnoreFileDescriptor(fd protoreflect.FileDescriptor) Option
WithIgnoreFileDescriptor ignore some method likes grpc/health
func WithKeepAlive ¶
func WithKeepAlive(keepalive *keepalive.ServerParameters) Option
WithKeepAlive setup keepalive parameters
func WithProjectName ¶ added in v1.3.0
WithProjectName add project name into alert message
func WithPrometheus ¶
WithPrometheus enable prometheus metrics
type RegisterEndpoint ¶ added in v1.3.0
RegisterEndpoint the only entrance for register service