libapp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const DiscoveryAddress = "localhost:8500"

Variables

Functions

func GetLogger added in v0.0.6

func GetLogger() log.Logger

func NewContext added in v0.1.0

func NewContext(ctx context.Context, requiredFeature string) context.Context

func NewDiscovery added in v0.1.0

func NewDiscovery() (registry.Discovery, error)

func NewLeakyBucketMiddleware added in v0.2.1

func NewLeakyBucketMiddleware(rate int) middleware.Middleware

func NewNodeFilter added in v0.1.0

func NewNodeFilter() selector.NodeFilter

func NewRegistrar added in v0.1.0

func NewRegistrar() (registry.Registrar, error)

func NewStreamMiddlewareJwt added in v0.1.3

func NewStreamMiddlewareJwt(auth *libauth.Auth) func(ctx context.Context) (context.Context, error)

func NewValidator added in v0.1.9

func NewValidator() (middleware.Middleware, error)

Types

type Env added in v0.0.10

type Env string
const (
	EnvCreateAdmin Env = "CREATE_ADMIN"
	EnvLogLevel    Env = "LOG_LEVEL"
)

type Flags added in v0.0.10

type Flags struct {
	ConfPath string
	DataPath string
}

type HealthChecker added in v0.2.0

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

func NewHealthChecker added in v0.2.0

func NewHealthChecker(serviceName string) (*HealthChecker, error)

func (*HealthChecker) GetAliveInstances added in v0.2.0

func (hc *HealthChecker) GetAliveInstances() ([]*api.ServiceEntry, error)

type InherentSettings added in v0.0.10

type InherentSettings struct {
	EnablePanicRecovery bool
	LogLevel            libzap.Level
	DefaultConfPath     string
}

type Settings added in v0.0.10

type Settings struct {
	InherentSettings
	Flags
	Version           string
	ProtoVersion      string
	BuildDate         string
	SourceCodeAddress string
	// contains filtered or unexported fields
}

func NewAppSettings added in v0.0.10

func NewAppSettings(id, name, version, protoVersion, date string) (*Settings, error)

func (*Settings) GetEnv added in v0.0.10

func (a *Settings) GetEnv(env Env) (string, error)

func (*Settings) GetEnvBool added in v0.0.10

func (a *Settings) GetEnvBool(env Env) (bool, error)

func (*Settings) LoadConfig added in v0.0.10

func (a *Settings) LoadConfig(conf interface{})

Jump to

Keyboard shortcuts

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