launcher

package
v2.0.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Launcher

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

func NewLauncher

func NewLauncher(name string, specs ...ServiceSpec) (l *Launcher, err error)

func (*Launcher) Launch

func (l *Launcher) Launch() (err error)

Launch starts the gRPC server and the corresponding gRPC-HTTP gateway with the given gRPC server Options

type NewServiceFunc

type NewServiceFunc[T service.Service] func(opts ...service.Option[T]) T

type ServiceInitFunc

type ServiceInitFunc[T service.Service] func(svc T) ([]server.StartGRPCServerOption, error)

type ServiceSpec

type ServiceSpec interface {
	NewService(db persistence.Storage) (svc service.Service, grpcOpts []server.StartGRPCServerOption, err error)
}

ServiceSpec is an interface we need because of generics foo.

func NewServiceSpec

func NewServiceSpec[T service.Service](nsf NewServiceFunc[T], wsf WithStorageFunc[T], init ServiceInitFunc[T], opts ...service.Option[T]) ServiceSpec

type WithStorageFunc

type WithStorageFunc[T service.Service] func(db persistence.Storage) service.Option[T]

Jump to

Keyboard shortcuts

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