server

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsFromContext

func ClaimsFromContext(ctx context.Context) (*jws.ClaimSet, bool)

ClaimsFromContext retrieves the set of claims stored in a request context

func HandleSwagger

func HandleSwagger(mux *http.ServeMux)

HandleSwagger adds the swagger-ui to the provided mux

func MakeAuthStreamingInterceptor

func MakeAuthStreamingInterceptor(kf keysFunc) func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error

MakeAuthStreamingInterceptor is gRPC stream interceptor that checks for the required claims in JWT in the authorization header.

func MakeAuthUnaryInterceptor

func MakeAuthUnaryInterceptor(kf keysFunc) func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

MakeAuthUnaryInterceptor is gRPC unary interceptor that checks for the required claims in JWT in the authorization header.

func Register

func Register(ctx context.Context, srv *http.Server, grpcServer *grpc.Server, dopts []grpc.DialOption, opts ...serverOpt) error

Register sets up the log server on the provided http and grpc servers. THe dial options will be used for all outbound gRPC reuqests.

func RegisterStats

func RegisterStats()

RegisterStats explicitly register the prometheus metrics, this prevents them showing up in the client

func WithCheckClaims

func WithCheckClaims(check bool) serverOpt

func WithGrafanaBasicAuth

func WithGrafanaBasicAuth(user, pass string) serverOpt

func WithIndex

func WithIndex(index *indexer.Indexer) serverOpt

Types

This section is empty.

Directories

Path Synopsis
Package statik contains static assets.
Package statik contains static assets.

Jump to

Keyboard shortcuts

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