server

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// The address to listen for GRPC requests on.
	Addr string `yaml:"addr" default:":8080"`
	// PreStopSleepSeconds is the number of seconds to sleep before stopping.
	// Useful for giving kubernetes time to drain connections.
	// This sleep will happen after a SIGTERM is received, and will
	// delay the shutdown of the server and all of it's components.
	// Note: Do not set this to a value greater than the kubernetes
	// terminationGracePeriodSeconds.
	PreStopSleepSeconds int `yaml:"preStopSleepSeconds" default:"0"`
	// GatewayAddr is the address to listen on for the grpc-gateway.
	GatewayAddr string `yaml:"gatewayAddr" default:":7007"`
	// MetricsAddr is the address to listen on for metrics.
	MetricsAddr string `yaml:"metricsAddr" default:":9090"`
	// PProfAddr is the address to listen on for pprof.
	PProfAddr *string `yaml:"pprofAddr"`
	// LoggingLevel is the logging level to use.
	LoggingLevel string `yaml:"logging" default:"info"`
	// Store is the cache configuration.
	Persistence persistence.Config `yaml:"persistence"`
	// Store is the cache configuration.
	Store store.Config `yaml:"store"`
	// Services is the list of services to run.
	Services service.Config `yaml:"services"`
}

func (*Config) Validate

func (c *Config) Validate() error

type Frontend

type Frontend struct {
	// contains filtered or unexported fields
}

func NewFrontend

func NewFrontend(log logrus.FieldLogger) *Frontend

func (*Frontend) Start

func (f *Frontend) Start() error

type ObjectDownloader

type ObjectDownloader struct {
	// contains filtered or unexported fields
}

func NewObjectDownloader

func NewObjectDownloader(log logrus.FieldLogger, store tStore.Store, mux *runtime.ServeMux, grpcConn string, grpcOpts []grpc.DialOption) *ObjectDownloader

func (*ObjectDownloader) Start

func (d *ObjectDownloader) Start() error

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, log logrus.FieldLogger, conf *Config) (*Server, error)

func (*Server) Start

func (x *Server) Start(ctx context.Context) error

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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