chassis

package
v0.0.0-...-367b6cc Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Configuration_LogLevel_name = map[int32]string{
		0: "TRACE",
		1: "DEBUG",
		2: "INFO",
		3: "WARN",
		4: "ERROR",
	}
	Configuration_LogLevel_value = map[string]int32{
		"TRACE": 0,
		"DEBUG": 1,
		"INFO":  2,
		"WARN":  3,
		"ERROR": 4,
	}
)

Enum value maps for Configuration_LogLevel.

View Source
var DefaultConfigurationFile = ".slime-service.toml"
View Source
var File_chassis_configuration_proto protoreflect.FileDescriptor

Functions

func AddConfiguration

func AddConfiguration(key string, cfg interface{})

func Attach

func Attach(a Adapter)

func Run

func Run()

func SetConfiguration

func SetConfiguration(cfg *Configuration)

func Start

func Start()

func Stop

func Stop()

Types

type Adapter

type Adapter interface {
	Register() (string, interface{})
	Initialize()
	Detach()
}

func Singleton

func Singleton(key string) Adapter

type Configuration

type Configuration struct {
	LogLevel Configuration_LogLevel `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

func GetConfiguration

func GetConfiguration() *Configuration

func (*Configuration) Descriptor deprecated

func (*Configuration) Descriptor() ([]byte, []int)

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetLogLevel

func (x *Configuration) GetLogLevel() Configuration_LogLevel

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

func (x *Configuration) ProtoReflect() protoreflect.Message

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type Configuration_LogLevel

type Configuration_LogLevel int32
const (
	Configuration_TRACE Configuration_LogLevel = 0
	Configuration_DEBUG Configuration_LogLevel = 1
	Configuration_INFO  Configuration_LogLevel = 2
	Configuration_WARN  Configuration_LogLevel = 3
	Configuration_ERROR Configuration_LogLevel = 4
)

func (Configuration_LogLevel) Descriptor

func (Configuration_LogLevel) Enum

func (Configuration_LogLevel) EnumDescriptor deprecated

func (Configuration_LogLevel) EnumDescriptor() ([]byte, []int)

Deprecated: Use Configuration_LogLevel.Descriptor instead.

func (Configuration_LogLevel) Number

func (Configuration_LogLevel) String

func (x Configuration_LogLevel) String() string

func (Configuration_LogLevel) Type

type ContextChain

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

func NewContextChain

func NewContextChain() *ContextChain

func (*ContextChain) AddFunc

func (c *ContextChain) AddFunc(contextFunc ContextFunc) *ContextChain

func (*ContextChain) Exec

func (c *ContextChain) Exec(ctx context.Context, keyValues ...interface{}) (context.Context, error)

type ContextFunc

type ContextFunc func(context.Context) (context.Context, error)

Jump to

Keyboard shortcuts

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