server

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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)

func RegisteAuthorizationValidator

func RegisteAuthorizationValidator(name string, handler proposal.UserinfoHandler)

Types

type GRPCServer added in v1.3.0

type GRPCServer interface {
	Serve(lis net.Listener) error
	GracefulStop()
	// contains filtered or unexported methods
}

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 how setup client

func WithCredential

func WithCredential(credential credentials.TransportCredentials) Option

WithCredential setup credential for tls

func WithEnforcementPolicy

func WithEnforcementPolicy(enforcementPolicy *keepalive.EnforcementPolicy) Option

WithEnforcementPolicy setup enforcement policy

func WithKeepAlive

func WithKeepAlive(keepalive *keepalive.ServerParameters) Option

WithKeepAlive setup keepalive parameters

func WithProjectName added in v1.3.0

func WithProjectName(name string) Option

func WithPrometheus

func WithPrometheus(metrics func(http.Handler)) Option

WithPrometheus enable prometheus metrics

type RegisterEndpoint added in v1.3.0

type RegisterEndpoint func(server *grpc.Server)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL