types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseServer

type BaseServer struct {
	Logger   *slog.Logger
	Listener net.Listener
}

func NewBaseServer

func NewBaseServer() *BaseServer

type Dispatcher

type Dispatcher interface {
	Dispatch()
}

type Optional

type Optional[T any] struct {
	// contains filtered or unexported fields
}

func OptionalEmpty

func OptionalEmpty[T any]() Optional[T]

func OptionalMap

func OptionalMap[T, U any](opt Optional[T], mapper func(T) U) Optional[U]

func OptionalOf

func OptionalOf[T any](v T) Optional[T]

func (Optional[T]) Else

func (t Optional[T]) Else(other T) T

func (Optional[T]) Filter

func (t Optional[T]) Filter(predicate func(T) bool) Optional[T]

func (Optional[T]) IfPresent

func (t Optional[T]) IfPresent(f func(T))

func (Optional[T]) IsEmpty

func (t Optional[T]) IsEmpty() bool

func (Optional[T]) IsPresent

func (t Optional[T]) IsPresent() bool

type Server

type Server interface {
	ServiceRegister
	Run(ctx context.Context) error
	Shutdown(ctx context.Context) error
}

type Service

type Service interface {
	Desc() grpc.ServiceDesc
	Handle(Server, any)
}

type ServiceRegister

type ServiceRegister interface {
	RegisterService(svs ...Service)
}

Jump to

Keyboard shortcuts

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