akit

package module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 11 Imported by: 0

README

akit

akit is a microservice governance framework implements by golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClientConnect added in v0.0.8

func NewClientConnect(ctx context.Context, insecure bool, opts ...grpcx.ClientOption) (*grpc.ClientConn, error)

NewClientConnect is create a client connect

Types

type Engine

type Engine struct {
	Registrar registry.Registrar
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Engine

New create an Engine manager.

func (*Engine) Run

func (e *Engine) Run() error

Run is run an engine and work

func (*Engine) Stop

func (e *Engine) Stop() error

Stop is stops the engine.

type Option

type Option func(o *Engine)

Option is an engineOptions option.

func WithContext added in v0.0.8

func WithContext(ctx context.Context) Option

WithContext Context with service context.

func WithID added in v0.0.8

func WithID(id string) Option

WithID ID with service id.

func WithName added in v0.0.8

func WithName(name string) Option

WithName Name with service name.

func WithRegistrar added in v0.1.1

func WithRegistrar(registrar registry.Registrar) Option

WithRegistrar is with registrar

func WithServer added in v0.0.8

func WithServer(srv ...servers.Server) Option

WithServer Server with servers servers.

func WithSignal added in v0.0.8

func WithSignal(sigs ...os.Signal) Option

WithSignal Signal with exit signals.

func WithVersion added in v0.0.8

func WithVersion(version string) Option

WithVersion Version with service version.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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