grpc

package
v0.0.0-...-3ec0304 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrCouldNotListen = "could not start a listener"

	LogStartingServerListAddress = "listenAddress"
	LogStartingServerMessage     = "starting server"
)
View Source
const (
	LoggingPackageName = "internal.apiserver.grpc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfiguration

type APIConfiguration interface {
	RegisterAPI(*grpc.Server)
}

type AuthenticationConfiguration

type AuthenticationConfiguration struct {
	OIDCAudience string
	OIDCURL      string
}

type AuthorizationConfiguration

type AuthorizationConfiguration interface {
	RegisterAuthorization(logger *zap.Logger) ([]grpc.UnaryServerInterceptor, []grpc.StreamServerInterceptor)
}

type Error

type Error struct {
	Message string
	Err     error
}

func (*Error) Error

func (e *Error) Error() string

type InterceptorConfiguration

type InterceptorConfiguration struct {
	AuthenticationEnabled bool
	AuthorizationEnabled  bool
	PrometheusEnabled     bool
	RecoveryEnabled       bool
}

type Server

type Server interface {
	Serve()
}

func New

func New(config ServerConfiguration) Server

type ServerConfiguration

type ServerConfiguration struct {
	Port           string
	Interceptors   InterceptorConfiguration
	Authentication AuthenticationConfiguration
	Authorizations []AuthorizationConfiguration
	APIs           []APIConfiguration

	ErrorChannel chan<- error
	Logger       *zap.Logger
}

type VersionV1AuthorizationConfiguration

type VersionV1AuthorizationConfiguration struct{}

func (*VersionV1AuthorizationConfiguration) RegisterAuthorization

func (config *VersionV1AuthorizationConfiguration) RegisterAuthorization(inputLogger *zap.Logger) (unary []grpc.UnaryServerInterceptor, stream []grpc.StreamServerInterceptor)

Directories

Path Synopsis
apis
interceptors

Jump to

Keyboard shortcuts

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