components

package
v0.0.0-...-e27afb6 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: AGPL-3.0 Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GRPCClient

func GRPCClient(ctx context.Context, cfg GRPCClientConfig) (*grpc.ClientConn, error)

func GRPCServer

func GRPCServer(ctx context.Context, cfg GRPCServerConfig) *grpc.Server

func GinServer

func GinServer(ctx context.Context) *gin.Engine

func ListenAndServeHTTP

func ListenAndServeHTTP(ctx context.Context, cfg HTTPServerConfig, handler http.Handler) error

func ListenAndServeNFS

func ListenAndServeNFS(ctx context.Context, cfg NFSServerConfig, fs afero.Fs) error

func TranslateHeadersToMetadata

func TranslateHeadersToMetadata() gin.HandlerFunc

TranslateHeadersToMetadata provides a gin handler that will copy Headers from an HTTP request to gRPC headers.

Types

type GRPCClientConfig

type GRPCClientConfig struct {
	Target string         `json:"target" usage:"address the grpc client should dial"`
	TLS    livetls.Config `json:"tls"`

	auth.Config
	OIDC  oidcauth.Config        `json:"oidc"`
	Basic basicauth.ClientConfig `json:"basic"`
}

type GRPCServerConfig

type GRPCServerConfig struct {
	auth.Config
	OIDC  oidcauth.ClientConfig `json:"oidc"`
	Basic basicauth.Config      `json:"basic"`
}

type HTTPServerConfig

type HTTPServerConfig struct {
	Port int            `json:"port" usage:"which port the HTTP server should be bound to" default:"8080"`
	TLS  livetls.Config `json:"tls"`
}

type NFSServerConfig

type NFSServerConfig struct {
	Enable bool `json:"enable" usage:"enable NFS support"`
	Port   int  `json:"port"   usage:"which port the NFS server should be bound to" default:"2049"`
}

Jump to

Keyboard shortcuts

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