ability

package
v0.0.0-...-f13fc7a Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsyncExecute

func AsyncExecute(instanceID, abilityID, abilityType, abilityFuncKey string, arg []byte) (chan *common_type.AbilityResponse, error)

func CancelAbility

func CancelAbility(instanceID string)

func CheckAbility

func CheckAbility(abilities []*types.Ability) bool

func GetConfig

func GetConfig(instanceID, abilityID string) (map[string]string, error)

func InitAbility

func InitAbility()

func RegisterAbility

func RegisterAbility(instanceID string, abilities []*types.Ability)

func SyncExecute

func SyncExecute(instanceID, abilityID, abilityType, abilityFuncKey string, arg []byte) ([]byte, error)

Types

type Ability

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

func NewAbility

func NewAbility() *Ability

func (*Ability) Cancel

func (a *Ability) Cancel(instanceID string)

func (*Ability) Check

func (a *Ability) Check(abilities []*types.Ability) bool

TODO 检测是否完整实现了Ability的所有函数

func (*Ability) Execute

func (a *Ability) Execute(instanceID, abilityID, abilityType, abilityFuncKey string, arg []byte) (chan *common_type.AbilityResponse, error)

func (*Ability) GetConfig

func (a *Ability) GetConfig(instanceID, abilityID string) (map[string]string, error)

func (*Ability) Register

func (a *Ability) Register(instanceID string, abilities []*types.Ability)

func (*Ability) Search

func (a *Ability) Search(instanceID, abilityID string) (*types.Ability, error)

func (*Ability) SyncExecute

func (a *Ability) SyncExecute(instanceID, abilityID, abilityType, abilityFuncKey string, arg []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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