minikit

package module
v0.0.0-...-f56c167 Latest Latest
Warning

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

Go to latest
Published: May 30, 2022 License: MIT Imports: 10 Imported by: 4

README

minikit

AFAIRE

Go Report Card Go Reference

Licence

MIT.


Copyright (c) 2021-2022 losyme

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppKit

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

func New

func New(cs *Components) *AppKit

func (*AppKit) NewCmdLine

func (ak *AppKit) NewCmdLine(fnInit func(*cmdline.CmdLine)) Component

func (*AppKit) NewConfig

func (ak *AppKit) NewConfig(fnInit func(*config.Config)) Component

func (*AppKit) NewCrypto

func (ak *AppKit) NewCrypto() Component

func (*AppKit) NewGuard

func (ak *AppKit) NewGuard(ctx context.Context, signals ...os.Signal) Component

func (*AppKit) NewLogger

func (ak *AppKit) NewLogger() Component

func (*AppKit) Run

func (ak *AppKit) Run(cs ...Component) error

type Callback

type Callback func() error

type Component

type Component interface {
	Name() string
	Build() error
	Start() error
	Stop() error
	Close() error
}

func NewComponent

func NewComponent(name string, opts ...Option) Component

type Components

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

func NewComponents

func NewComponents(app *application.Application) *Components

func (*Components) Application

func (cs *Components) Application() *application.Application

func (*Components) Config

func (cs *Components) Config() *config.Config

func (*Components) Crypto

func (cs *Components) Crypto() *crypto.Crypto

func (*Components) Logger

func (cs *Components) Logger() *logger.Logger

type Cpt

type Cpt struct{}

func (*Cpt) Build

func (*Cpt) Build() error

func (*Cpt) Close

func (*Cpt) Close() error

func (*Cpt) Start

func (*Cpt) Start() error

func (*Cpt) Stop

func (*Cpt) Stop() error

type Option

type Option interface {
	// contains filtered or unexported methods
}

func WithBuild

func WithBuild(cb Callback) Option

func WithClose

func WithClose(cb Callback) Option

func WithStart

func WithStart(cb Callback) Option

func WithStop

func WithStop(cb Callback) Option

Jump to

Keyboard shortcuts

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