Documentation
¶
Index ¶
- Constants
- func CORSMiddleware() gin.HandlerFunc
- type Agent
- type AgentsSyncMap
- func (agentsMap *AgentsSyncMap) AgentToJson(id uint64) ([]byte, error)
- func (agentsMap *AgentsSyncMap) GetAll() []Agent
- func (agentsMap *AgentsSyncMap) Tick()
- func (agentsMap *AgentsSyncMap) ToJson() ([]byte, error)
- func (agentsMap *AgentsSyncMap) TryGet(id uint64) (Agent, error)
- func (agentsMap *AgentsSyncMap) Update(agents ...Agent)
- type App
- type AppConfig
Constants ¶
View Source
const HeartbeatInterval = 20
View Source
const StaleInterval = 3 * HeartbeatInterval
Variables ¶
This section is empty.
Functions ¶
func CORSMiddleware ¶
func CORSMiddleware() gin.HandlerFunc
Types ¶
type AgentsSyncMap ¶
type AgentsSyncMap struct {
// contains filtered or unexported fields
}
func NewAgentsSyncMap ¶
func NewAgentsSyncMap(logger *logger.Logger) *AgentsSyncMap
func (*AgentsSyncMap) AgentToJson ¶
func (agentsMap *AgentsSyncMap) AgentToJson(id uint64) ([]byte, error)
func (*AgentsSyncMap) GetAll ¶
func (agentsMap *AgentsSyncMap) GetAll() []Agent
func (*AgentsSyncMap) Tick ¶
func (agentsMap *AgentsSyncMap) Tick()
func (*AgentsSyncMap) ToJson ¶
func (agentsMap *AgentsSyncMap) ToJson() ([]byte, error)
func (*AgentsSyncMap) Update ¶
func (agentsMap *AgentsSyncMap) Update(agents ...Agent)
Click to show internal directories.
Click to hide internal directories.