implements

package
v0.0.0-...-1382dd4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(scheme string, creator Spawner)

Types

type Implement

type Implement interface {
	// Fetch must return non nil status value, or it will panic
	// return error if entity is offline
	Fetch(ctx context.Context) (status.Status, error)
	Multiplier() uint
}

Implement 必须在每个子类中实现的实际方法

func Spawn

func Spawn(entity *models.Application) (Implement, error)

type Spawner

type Spawner func(options bson.M) Implement

type Template

type Template struct{}

func (Template) Fetch

func (t Template) Fetch(ctx context.Context) (status.Status, error)

func (Template) Multiplier

func (t Template) Multiplier() uint

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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