Documentation ¶
Index ¶
- Constants
- Variables
- func MakeAuthFunc(provisioner tokens.ContextProvisioner) func(context.Context) (context.Context, error)
- func OverrideAuthFunc(override grpc_auth.ServiceAuthFuncOverride) grpc_auth.AuthFunc
- type ClientFlags
- type DisabledAuth
- type Option
- type Options
- type PermissiveAuth
- type ServerFlags
- func (flags *ServerFlags) CorsMatch(origin string) bool
- func (f ServerFlags) CorsOrigins() []string
- func (flags *ServerFlags) GRPCListen(ctx context.Context) error
- func (f *ServerFlags) GRPCServer() *grpc.Server
- func (f ServerFlags) GrpcPort() int
- func (flags *ServerFlags) HTTPListen(ctx context.Context) error
- func (f *ServerFlags) HTTPMux() *runtime.ServeMux
- func (f ServerFlags) HttpPort() int
- func (flags *ServerFlags) Listen(ctx context.Context, logger logr.Logger) error
- func (flags *ServerFlags) RegisterGateway(ctx context.Context, logger logr.Logger, ...) error
- func (f *ServerFlags) TokenProvisioner() tokens.Provisioner
- func (f *ServerFlags) WithOptions(options ...Option) error
Constants ¶
View Source
const ( DefaultGrpcPort int = 9090 DefaultHttpPort int = 8081 )
Variables ¶
View Source
var ErrorNoMethod error = errors.New("no method found in context")
Functions ¶
func MakeAuthFunc ¶
func OverrideAuthFunc ¶
func OverrideAuthFunc(override grpc_auth.ServiceAuthFuncOverride) grpc_auth.AuthFunc
Types ¶
type ClientFlags ¶
type ClientFlags struct {
// contains filtered or unexported fields
}
func SetupClientFlags ¶
func SetupClientFlags(clientName string, flags *pflag.FlagSet) *ClientFlags
func (ClientFlags) Client ¶
func (f ClientFlags) Client(ctx context.Context, logger logr.Logger) (*grpc.ClientConn, error)
func (ClientFlags) MustClient ¶
func (f ClientFlags) MustClient(ctx context.Context, logger logr.Logger) *grpc.ClientConn
type Option ¶
func WithAllowedMethods ¶
type PermissiveAuth ¶
type PermissiveAuth struct {
// contains filtered or unexported fields
}
func MakePermissiveAuthFunc ¶
func MakePermissiveAuthFunc(provisioner tokens.ContextProvisioner, allowedMethods []string) *PermissiveAuth
func (*PermissiveAuth) AuthFuncOverride ¶
type ServerFlags ¶
type ServerFlags struct {
// contains filtered or unexported fields
}
func SetupServerFlags ¶
func SetupServerFlags(flags *pflag.FlagSet) *ServerFlags
func (*ServerFlags) CorsMatch ¶
func (flags *ServerFlags) CorsMatch(origin string) bool
func (ServerFlags) CorsOrigins ¶
func (f ServerFlags) CorsOrigins() []string
func (*ServerFlags) GRPCListen ¶
func (flags *ServerFlags) GRPCListen(ctx context.Context) error
func (*ServerFlags) GRPCServer ¶
func (f *ServerFlags) GRPCServer() *grpc.Server
func (ServerFlags) GrpcPort ¶
func (f ServerFlags) GrpcPort() int
func (*ServerFlags) HTTPListen ¶
func (flags *ServerFlags) HTTPListen(ctx context.Context) error
func (*ServerFlags) HTTPMux ¶
func (f *ServerFlags) HTTPMux() *runtime.ServeMux
func (ServerFlags) HttpPort ¶
func (f ServerFlags) HttpPort() int
func (*ServerFlags) RegisterGateway ¶
func (*ServerFlags) TokenProvisioner ¶
func (f *ServerFlags) TokenProvisioner() tokens.Provisioner
func (*ServerFlags) WithOptions ¶
func (f *ServerFlags) WithOptions(options ...Option) error
WithOptions allows the setting of options for the grpc server
Click to show internal directories.
Click to hide internal directories.