udsapi

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRoutes

func RegisterRoutes(router gin.IRouter, handlers *core.Handlers)

RegisterRoutes registers the shared daemon API routes on the supplied router.

Types

type Option

type Option func(*Server)

Option customizes UDS server construction.

func WithEngine

func WithEngine(engine *gin.Engine) Option

WithEngine overrides the Gin engine used by the server.

func WithHandlers

func WithHandlers(handlers *core.Handlers) Option

WithHandlers injects the shared transport handlers.

func WithSocketPath

func WithSocketPath(path string) Option

WithSocketPath overrides the Unix socket path.

type Server

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

Server exposes the daemon API over a Unix domain socket.

func New

func New(opts ...Option) (*Server, error)

New constructs a UDS API server.

func (*Server) Path

func (s *Server) Path() string

Path reports the served Unix domain socket path.

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

Shutdown stops accepting new requests, drains active ones, and removes the socket file.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start begins serving the API over the configured Unix domain socket.

Jump to

Keyboard shortcuts

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