kita

package module
v0.1.0-alpha3 Latest Latest
Warning

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

Go to latest
Published: May 12, 2021 License: MIT Imports: 10 Imported by: 0

README

KitA

This is basically a variant of the go-kratos project,with some differences:

  • A completely redesigned log API.
  • Separate Codec into Encoder and Decoder, register and get Encoder&Decoder via full content type.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReleaseVersion = _version_

Functions

This section is empty.

Types

type App

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

App is an application components lifecycle manager

func New

func New(opts ...Option) *App

New create an application lifecycle manager.

func (*App) Run

func (a *App) Run() error

Run executes all OnStart hooks registered with the application's Lifecycle.

func (*App) Stop

func (a *App) Stop() error

Stop gracefully stops the application.

type Option

type Option func(o *options)

Option is an application option.

func Context

func Context(ctx context.Context) Option

Context with service context.

func Endpoint

func Endpoint(endpoints ...string) Option

Endpoint with service endpoint.

func ID

func ID(id string) Option

ID with service id.

func Logger

func Logger(logger log.Logger) Option

Logger with service logger.

func Metadata

func Metadata(md map[string]string) Option

Metadata with service metadata.

func Name

func Name(name string) Option

Name with service name.

func Registrar

func Registrar(r registry.Registrar) Option

Registrar with service registry.

func Server

func Server(srv ...transport.Server) Option

Server with transport servers.

func Signal

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

Signal with exit signals.

func Version

func Version(version string) Option

Version with service version.

Directories

Path Synopsis
api
cmd
kita-cli Module
proto
Package proto defines the protobuf codec.
Package proto defines the protobuf codec.
internal

Jump to

Keyboard shortcuts

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