server

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 42 Imported by: 0

Documentation

Overview

Package server contains a hybrid gRPC+HTTP server to store and retrieve files.

Index

Constants

This section is empty.

Variables

Set is used by wire.

Functions

func ProvideCertificates

func ProvideCertificates(cfg *common.Config, log *log.Logger) ([]tls.Certificate, error)

ProvideCertificates will load the certificate and keys specified and can optionally generate a self-signed certificate for debugging.

Types

type Server

type Server struct {
	BoundAddr net.Addr
	// A loopback connection to the server.
	Conn *grpc.ClientConn
}

Server contains the configuration and main HTTP loop.

func ProvideServer

func ProvideServer(
	ctx context.Context,
	busyLatch common.BusyLatch,
	certificates []tls.Certificate,
	cfg *common.Config,
	debug rest.DebugMux,
	logger *log.Logger,
	public rest.PublicMux,
) (*Server, func(), error)

ProvideServer constructs a new Server.

Directories

Path Synopsis
Package common contains utility code that is common between HTTP and RPC interfaces.
Package common contains utility code that is common between HTTP and RPC interfaces.
Package diag contains code to retrieve diagnostic information from the server.
Package diag contains code to retrieve diagnostic information from the server.
Package oidc provide OpenID Connect integration for cacheroach.
Package oidc provide OpenID Connect integration for cacheroach.
Package rest contains the support code for the plain HTTP API.
Package rest contains the support code for the plain HTTP API.
Package rpc contains the gRPC endpoints and support code.
Package rpc contains the gRPC endpoints and support code.

Jump to

Keyboard shortcuts

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