app

package
v1.46.0-tgt.2 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFlags

func AddFlags(flagSet *flag.FlagSet)

AddFlags adds flags to flag set.

Types

type Options

type Options struct {
	// GRPCHostPort is the host:port address for gRPC server
	GRPCHostPort string
	// TLSGRPC configures secure transport
	TLSGRPC tlscfg.Options
	// Tenancy configuration
	Tenancy tenancy.Options
}

Options holds configuration for remote-storage service.

func (*Options) InitFromViper

func (o *Options) InitFromViper(v *viper.Viper, logger *zap.Logger) (*Options, error)

InitFromViper initializes Options with properties from CLI flags.

type Server

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

Server runs a gRPC server

func NewServer

func NewServer(options *Options, storageFactory storage.Factory, tm *tenancy.Manager, logger *zap.Logger) (*Server, error)

NewServer creates and initializes Server.

func (*Server) Close

func (s *Server) Close() error

Close stops http, GRPC servers and closes the port listener.

func (Server) HealthCheckStatus

func (s Server) HealthCheckStatus() chan healthcheck.Status

HealthCheckStatus returns health check status channel a client can subscribe to

func (*Server) Start

func (s *Server) Start() error

Start gRPC server concurrently

Jump to

Keyboard shortcuts

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