manager

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	EnvLocal       Environment = "local"
	EnvTest                    = "test"
	EnvDevelopment             = "development"
	EnvProduction              = "production"
)

Variables

This section is empty.

Functions

func WithoutGracefulShutdown

func WithoutGracefulShutdown() opt

Types

type Config

type Config struct {
	AppName     string      `env:"APP"`
	Env         Environment `env:"ENV" envDefault:"local"`
	DatadogIP   string      `env:"DATADOG_IP"`
	DatadogPort string      `env:"DATADOG_PORT"`
}

type Environment

type Environment string

type Manager

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

func New

func New(opts ...opt) *Manager

func (*Manager) App

func (m *Manager) App() string

func (*Manager) Context

func (m *Manager) Context() context.Context

func (*Manager) Env

func (m *Manager) Env() Environment

func (*Manager) ForceKill

func (m *Manager) ForceKill()

func (*Manager) Logger

func (m *Manager) Logger() util.Logger

func (*Manager) Metrics

func (m *Manager) Metrics() util.Metrics

func (*Manager) RegisterBackgroundSvc

func (m *Manager) RegisterBackgroundSvc(name string, starter backgroundSvcStarter, stopper backgroundSvcStopper)

func (*Manager) RegisterGRPCServer

func (m *Manager) RegisterGRPCServer(name string, port string, opts ...grpc.ServerOption) *grpc.Server

func (*Manager) RegisterHttpServer

func (m *Manager) RegisterHttpServer(name string, srv *http.Server)

func (*Manager) WaitForInterrupt

func (m *Manager) WaitForInterrupt()

Jump to

Keyboard shortcuts

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