Documentation
¶
Index ¶
- Variables
- func GetFrom(id string, args ...interface{}) (data []byte, err error)
- func GetFromInstanceAliveN() int32
- func GetFromS(s string) (data []byte, err error)
- func Register(id string, fn FuncGetFrom)
- func TryRegister(id string, fn FuncGetFrom) bool
- func TryUnregister(id string) bool
- func UnRegister(id string)
- type FuncGetFrom
- type GetFromInstance
- func (this *GetFromInstance) Close()
- func (this *GetFromInstance) GetConf() (id string, arg string)
- func (this *GetFromInstance) GetFrom() ([]byte, error)
- func (this *GetFromInstance) GetFromArg(arg interface{}) ([]byte, error)
- func (this *GetFromInstance) GetFromArgs(args ...interface{}) ([]byte, error)
- func (this *GetFromInstance) GetFromS(s string) ([]byte, error)
- func (this *GetFromInstance) GetS() string
- func (this *GetFromInstance) Update(s string) (id string, arg string, changed bool)
- func (this *GetFromInstance) Valid() bool
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("Func Not Found!!!!")
)
Functions ¶
func GetFromInstanceAliveN ¶
func GetFromInstanceAliveN() int32
func Register ¶
func Register(id string, fn FuncGetFrom)
func TryRegister ¶
func TryRegister(id string, fn FuncGetFrom) bool
func TryUnregister ¶
func UnRegister ¶
func UnRegister(id string)
Types ¶
type FuncGetFrom ¶
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
Click to show internal directories.
Click to hide internal directories.