server

package
v0.0.0-...-bc4c7a2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(KV KV, logger zerolog.Logger, opts ...grpc.ServerOption) *grpc.Server

New creates and configures a new gRPC server instance with logging middleware, health checks, and the registered KV service.

Types

type KV

type KV interface {
	Storer
	ServerProvider
}

KV combines storage and cluster awareness.

type ServerProvider

type ServerProvider interface {
	GetServers() ([]*api.Server, error)
}

ServerProvider defines the interface for gettings the servers in the cluster.

type Storer

type Storer interface {
	Get(key string) ([]byte, error)
	Set(key string, value []byte) error
	Delete(key string) error
	List() <-chan []byte
}

Storer defines the interface for a the key-value storage.

Jump to

Keyboard shortcuts

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