grpcapp

package
v0.0.0-...-4ff85e9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InterceptorLogger

func InterceptorLogger(l *slog.Logger) logging.Logger

InterceptorLogger adapts slog logger to interceptor logger.

Types

type App

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

func New

func New(opts *GRPCOpts, storage *services.StorageService, dht *services.DHTService) *App

New creates new gRPC server app

func (*App) MustRun

func (a *App) MustRun(notifyReady chan<- bool)

MustRun runs gRPC server and panics if any error occurs

func (*App) Run

func (a *App) Run(notifyReady chan<- bool) error

Run runs gRPC server

func (*App) Stop

func (a *App) Stop()

Stop stops gRPC server

type GRPCOpts

type GRPCOpts struct {
	Port   int
	Logger *slog.Logger

	NotifyRebase    chan<- bool
	ReplicationChan chan<- *cas.KeyHashPair
}

Jump to

Keyboard shortcuts

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