getfrom

package
v1.3.1-pre15 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("Func Not Found!!!!")
)

Functions

func GetFrom

func GetFrom(id string, args ...interface{}) (data []byte, err error)

func GetFromInstanceAliveN

func GetFromInstanceAliveN() int32

func GetFromS

func GetFromS(s string) (data []byte, err error)

func Register

func Register(id string, fn FuncGetFrom)

func TryRegister

func TryRegister(id string, fn FuncGetFrom) bool

func TryUnregister

func TryUnregister(id string) bool

func UnRegister

func UnRegister(id string)

Types

type FuncGetFrom

type FuncGetFrom func(args ...interface{}) (data []byte, err error)

func GetFunc

func GetFunc(id string) FuncGetFrom

type GetFromInstance

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

func NewGetFromInstance

func NewGetFromInstance() *GetFromInstance

func (*GetFromInstance) Close

func (this *GetFromInstance) Close()

func (*GetFromInstance) GetConf

func (this *GetFromInstance) GetConf() (id string, arg string)

func (*GetFromInstance) GetFrom

func (this *GetFromInstance) GetFrom() ([]byte, error)

使用传入的参数进行调用

func (*GetFromInstance) GetFromArg

func (this *GetFromInstance) GetFromArg(arg interface{}) ([]byte, error)

使用arg作为第一个参数

func (*GetFromInstance) GetFromArgs

func (this *GetFromInstance) GetFromArgs(args ...interface{}) ([]byte, error)

使用args...作为参数

func (*GetFromInstance) GetFromS

func (this *GetFromInstance) GetFromS(s string) ([]byte, error)

s 为完整字符串, type 必须等于this.id

func (*GetFromInstance) GetS

func (this *GetFromInstance) GetS() string

func (*GetFromInstance) Update

func (this *GetFromInstance) Update(s string) (id string, arg string, changed bool)

func (*GetFromInstance) Valid

func (this *GetFromInstance) Valid() bool

Jump to

Keyboard shortcuts

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