engine

package
v0.0.0-...-730ab85 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddServe

func AddServe(s ...api.Server)

func GetContext

func GetContext() context.Context

func GetFlag

func GetFlag() []flag.Flag

func GetFlagSet

func GetFlagSet() *flag.Set

func GetTimingWheel

func GetTimingWheel() *timer.TimingWheel

func SetConfig

func SetConfig(cf *Config)

func SetFlag

func SetFlag(fg []flag.Flag)

func SetFlagSet

func SetFlagSet(fs *flag.Set)

func SetRegistry

func SetRegistry(rgy registry.Registry)

Types

type Config

type Config struct {
	Name string
	Mode string

	Config   *config.Options
	Logger   *logger.Options
	Redis    *redis.Options
	Orm      *model.Options
	Tracer   *tracer.Options
	Server   []*server.Options
	Registry *registry.Options

	Watcher api.Watcher
}

func GetConfig

func GetConfig() *Config

func ParseConfig

func ParseConfig(fs *flags.Set) (*Config, error)

type ServiceContext

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

func GetServiceContext

func GetServiceContext() *ServiceContext

func (*ServiceContext) GetRegistry

func (sc *ServiceContext) GetRegistry() registry.Registry

func (*ServiceContext) GetServers

func (sc *ServiceContext) GetServers() []api.Server

Jump to

Keyboard shortcuts

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