runner

package
v0.0.0-...-eec4b17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EnvServerAddress = "SERVER_ADDRESS"
	EnvServerPort    = "SERVER_PORT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Codec codec.Codec
	Amino *codec.LegacyAmino

	ChainClient         *chain.Client
	NotificationsClient *notifications.Client
	BranchClient        *branch.Client
	Scheduler           *scheduler.Scheduler
	Database            *database.Database
}

Context contains all the data used in order to build and run a Runner instance

type Runner

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

Runner represents the structure that allows to run everything related to the server

func New

func New(ctx Context) *Runner

New returns a new Runner instance

func (*Runner) Run

func (r *Runner) Run()

Run runs the server blocking the current goroutine until the server is shut down

func (*Runner) SetServiceRegistrar

func (r *Runner) SetServiceRegistrar(registrar ServiceRegistrar)

SetServiceRegistrar sets the given registrar as the service registrar

type ServiceRegistrar

type ServiceRegistrar func(context Context, server *grpc.Server)

Jump to

Keyboard shortcuts

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