Documentation
¶
Index ¶
- Variables
- func DispatchAgent(am *AgentManager, key string, req any) (int, any, error)
- func StopAgentManager(am *AgentManager)
- type Agent
- type AgentManager
- func (am *AgentManager) Add(k string, agent *Agent) error
- func (am *AgentManager) AtDel(k string) bool
- func (am *AgentManager) Del(k string, ag *Agent) bool
- func (am *AgentManager) DoWork(c actor.Context) actor.WorkerStatus
- func (am *AgentManager) GetIdlechan() chan any
- func (am *AgentManager) Len() int
- func (am *AgentManager) MarkDel(k string, expires int64) *Agent
- func (am *AgentManager) NewAgent(key string, cb func(*Call)) error
- func (am *AgentManager) Start()
- func (am *AgentManager) Stop()
- func (am *AgentManager) StopAgents(cb func(agent *Agent) bool)
- func (am *AgentManager) Val(k string) (*Agent, error)
- type AgentManagerOption
- type AgentOption
- type Call
- type Responser
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DispatchAgent ¶
func StopAgentManager ¶
func StopAgentManager(am *AgentManager)
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
func NewAgentWithOption ¶
func NewAgentWithOption(opt *AgentOption) *Agent
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
func NewAgentManager ¶
func NewAgentManager() *AgentManager
func NewAgentManagerWithOption ¶
func NewAgentManagerWithOption(opt *AgentManagerOption) *AgentManager
func (*AgentManager) AtDel ¶
func (am *AgentManager) AtDel(k string) bool
func (*AgentManager) DoWork ¶
func (am *AgentManager) DoWork(c actor.Context) actor.WorkerStatus
func (*AgentManager) GetIdlechan ¶
func (am *AgentManager) GetIdlechan() chan any
func (*AgentManager) Len ¶
func (am *AgentManager) Len() int
func (*AgentManager) Start ¶
func (am *AgentManager) Start()
func (*AgentManager) Stop ¶
func (am *AgentManager) Stop()
func (*AgentManager) StopAgents ¶
func (am *AgentManager) StopAgents(cb func(agent *Agent) bool)
type AgentManagerOption ¶
type AgentOption ¶
Click to show internal directories.
Click to hide internal directories.