comms

package
v0.32.16 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMissingVaultConfig = errors.New("missing vault config")
View Source
var ErrNilVaultConfig = errors.New("nil vault config")
View Source
var ErrNoHTTPConfig = errors.New("unable to create HTTP server with empty config")
View Source
var ErrNoHTTPListenAddress = errors.New("unable to create HTTP server with empty ListenAddress")

Functions

func CABundle

func CABundle(vaultConfig *config.VaultConfig) (*x509.CertPool, error)

func NewSecretClient

func NewSecretClient(config config.VaultConfig) (*api.Client, error)

NewSecretClient receives a configuration and returns a client for Vault.

func SlimRPCClient

func SlimRPCClient(serverAddress string, logger log.Logger) *grpc.ClientConn

func StandardHTTPServer

func StandardHTTPServer(cfg *config.Config) (*http.Server, error)

StandardHTTPServer returns a normal HTTP server.

func StandardRPCClient

func StandardRPCClient(serverAddress string, cfg config.Config, logger log.Logger) *grpc.ClientConn

StandardRPCClient implements enough to get standard gRPC client connection.

func StandardRPCServer

func StandardRPCServer(cfg *config.Config) (*grpc.Server, error)

StandardRPCServer returns a normal gRPC server.

func TestRPCServer

func TestRPCServer() (*grpc.Server, error)

Types

type HTTPServerFunc

type HTTPServerFunc func(*config.Config) (*http.Server, error)

HTTPServerFunc is used to create a new HTTP server using a received config.

type RPCServerFunc

type RPCServerFunc func(*config.Config) (*grpc.Server, error)

RPCServerFunc is used to create a new RPC server using a received config.

Jump to

Keyboard shortcuts

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