grpcserver

package
v0.0.0-...-447be40 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2025 License: MIT Imports: 25 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 {
	Enabled      bool
	Address      string
	AuthToken    string
	DatabasePath string
	MaxPageSize  int
}

Config holds runtime configuration for the gRPC server.

type Server

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

Server wraps a gRPC server instance and SQLite reader.

func New

func New(cfg Config, logger *slog.Logger, metrics *observability.Metrics) (*Server, error)

New constructs a Server. If cfg.Enabled is false, the returned server is a no-op.

func (*Server) Close

func (s *Server) Close() error

Close releases resources associated with the server.

func (*Server) Run

func (s *Server) Run(ctx context.Context)

Run starts serving requests until the context is cancelled. If the server is disabled, Run is a no-op.

Jump to

Keyboard shortcuts

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