server

package
v0.0.0-...-a0a9867 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-3-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsTCPAddr  = isAddrF(tcpPrefix)
	IsFileAddr = isAddrF(filePrefix)
	IsUnixAddr = isAddrF(unixPrefix)

	IsFileSystemAddr = func(addr string) bool { return IsFileAddr(addr) || IsUnixAddr(addr) }
)

Functions

func SetLogger

func SetLogger(logger zerolog.Logger)

Types

type Builder

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

func NewBuilder

func NewBuilder() *Builder

func (*Builder) Address

func (b *Builder) Address(addr string) *Builder

func (*Builder) Build

func (b *Builder) Build() (*Server, error)

func (*Builder) Context

func (b *Builder) Context(ctx context.Context) *Builder

func (*Builder) Datastore

func (b *Builder) Datastore(ds datastore.Datastore) *Builder

func (*Builder) SQLite

func (b *Builder) SQLite(path string) *Builder

type Server

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

func (*Server) Addr

func (s *Server) Addr() net.Addr

func (*Server) Serve

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

func (*Server) ServiceName

func (s *Server) ServiceName() string

func (*Server) Stop

func (s *Server) Stop()

Jump to

Keyboard shortcuts

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