config

package
v0.0.0-...-db7936d Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Grpc

type Grpc struct {
	Ctx         context.Context  // context for graceful shutdown
	Listen      string           // address to listen
	Restorer    service.Restorer // service to handle restore requests
	GracePeriod time.Duration    // grace period for graceful shutdown
	Wg          *sync.WaitGroup
}

Grpc is a configuration for gRPC server.

type Http

type Http struct {
	Ctx         context.Context
	Listen      uint16
	Router      *mux.Router
	GracePeriod time.Duration
	Wg          *sync.WaitGroup
}

Http is a configuration for http server.

type Redis

type Redis struct {
	Address, Password         string
	DB                        int
	ReadTimeout, WriteTimeout time.Duration
}

Redis is a configuration for standalone redis.

type StorageBackend

type StorageBackend struct {
	SourceCfg  *Redis        // short term storage
	StorageCfg []*Redis      // long term storage nodes
	ChanStop   chan struct{} // channel to stop the storage backend worker
	Wg         *sync.WaitGroup
}

StorageBackend is a struct that holds the configuration for the storage backend

Jump to

Keyboard shortcuts

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