Documentation
¶
Index ¶
- Constants
- type Cluster
- func (c *Cluster) CalcLeafPayloadSize(totalNodes int) int
- func (c *Cluster) DoGroupFullSync(node *gossip.Node) error
- func (c *Cluster) DoResourceLockFullSync(node *gossip.Node) error
- func (c *Cluster) DoResponseFullSync(node *gossip.Node) error
- func (c *Cluster) DoRoleFullSync(node *gossip.Node) error
- func (c *Cluster) DoScriptFullSync(node *gossip.Node) error
- func (c *Cluster) DoSessionFullSync(node *gossip.Node) error
- func (c *Cluster) DoSkillFullSync(node *gossip.Node) error
- func (c *Cluster) DoSpaceFullSync(node *gossip.Node) error
- func (c *Cluster) DoSpaceUsageFullSync(node *gossip.Node) error
- func (c *Cluster) DoStackDefinitionFullSync(node *gossip.Node) error
- func (c *Cluster) DoTemplateFullSync(node *gossip.Node) error
- func (c *Cluster) DoTemplateVarFullSync(node *gossip.Node) error
- func (c *Cluster) DoTokenFullSync(node *gossip.Node) error
- func (c *Cluster) DoUserFullSync(node *gossip.Node) error
- func (c *Cluster) DoVolumeFullSync(node *gossip.Node) error
- func (c *Cluster) EnqueueSpaceCleanup(space *model.Space)
- func (c *Cluster) ForwardToolApproval(req *toolapproval.ResponseRequest) (bool, error)
- func (c *Cluster) GetAgentEndpoints() []string
- func (c *Cluster) GetLocalNodeId() (string, error)
- func (c *Cluster) GetNodeByIDString(id string) *gossip.Node
- func (c *Cluster) GetTunnelServers() []string
- func (c *Cluster) GossipAuditLog(entry *model.AuditLogEntry)
- func (c *Cluster) GossipGroup(group *model.Group)
- func (c *Cluster) GossipResourceLock(resourceLock *ResourceLock)
- func (c *Cluster) GossipResponse(response *model.Response)
- func (c *Cluster) GossipRole(role *model.Role)
- func (c *Cluster) GossipScript(script *model.Script)
- func (c *Cluster) GossipSession(session *model.Session)
- func (c *Cluster) GossipSkill(skill *model.Skill)
- func (c *Cluster) GossipSpace(space *model.Space)
- func (c *Cluster) GossipSpaceUsageSample(sample *model.SpaceUsageSample)
- func (c *Cluster) GossipStackDefinition(stackDef *model.StackDefinition)
- func (c *Cluster) GossipTemplate(template *model.Template)
- func (c *Cluster) GossipTemplateVar(templateVar *model.TemplateVar)
- func (c *Cluster) GossipToken(token *model.Token)
- func (c *Cluster) GossipUser(user *model.User)
- func (c *Cluster) GossipVolume(volume *model.Volume)
- func (c *Cluster) HandleLeafServer(w http.ResponseWriter, r *http.Request)
- func (c *Cluster) LockResource(resourceId string) string
- func (c *Cluster) Nodes() []*gossip.Node
- func (c *Cluster) Start(peers []string, originServer string, originToken string)
- func (c *Cluster) Stop()
- func (c *Cluster) UnlockResource(resourceId, unlockToken string)
- type ResourceLock
- type ResourceLockRequestMsg
- type ResourceLockResponseMsg
- type ResourceUnlockRequestMsg
Constants ¶
View Source
const ( LEAF_PING_INTERVAL = 2 * time.Second RECONNECT_DELAY = 5 * time.Second )
View Source
const ( GroupFullSyncMsg gossip.MessageType = iota + gossip.UserMsg GroupGossipMsg RoleFullSyncMsg RoleGossipMsg SpaceFullSyncMsg SpaceGossipMsg TemplateFullSyncMsg TemplateGossipMsg TemplateVarFullSyncMsg TemplateVarGossipMsg UserFullSyncMsg UserGossipMsg TokenFullSyncMsg TokenGossipMsg SessionFullSyncMsg SessionGossipMsg VolumeFullSyncMsg VolumeGossipMsg AuditLogGossipMsg ResourceLockFullSyncMsg ResourceLockGossipMsg ResourceLockMsg ResourceUnlockMsg ScriptFullSyncMsg ScriptGossipMsg SkillFullSyncMsg SkillGossipMsg StackDefinitionFullSyncMsg StackDefinitionGossipMsg ResponseFullSyncMsg ResponseGossipMsg SpaceUsageFullSyncMsg SpaceUsageGossipMsg SpaceMigrationStartMsg ToolApprovalResponseMsg )
View Source
const ( ResourceLockTTL = 1 * time.Minute ResourceLockGCInterval = 30 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func (*Cluster) CalcLeafPayloadSize ¶
This is a duplicate of the gossip payload size calculation, however when gossip isn't running we still need this for sending to leaf nodes
func (*Cluster) DoResourceLockFullSync ¶
func (*Cluster) DoResponseFullSync ¶ added in v0.23.0
func (*Cluster) DoScriptFullSync ¶ added in v0.23.0
func (*Cluster) DoSkillFullSync ¶ added in v0.23.0
func (*Cluster) DoSpaceUsageFullSync ¶ added in v0.24.0
func (*Cluster) DoStackDefinitionFullSync ¶ added in v0.24.0
func (*Cluster) DoTemplateVarFullSync ¶
func (*Cluster) EnqueueSpaceCleanup ¶ added in v0.25.0
func (*Cluster) ForwardToolApproval ¶ added in v0.25.1
func (c *Cluster) ForwardToolApproval(req *toolapproval.ResponseRequest) (bool, error)
ForwardToolApproval sends an approval response to the instance that owns the pending request via gossip.
func (*Cluster) GetAgentEndpoints ¶
func (*Cluster) GetLocalNodeId ¶ added in v0.22.0
func (*Cluster) GetNodeByIDString ¶ added in v0.22.0
func (*Cluster) GetTunnelServers ¶
func (*Cluster) GossipAuditLog ¶
func (c *Cluster) GossipAuditLog(entry *model.AuditLogEntry)
func (*Cluster) GossipGroup ¶
func (*Cluster) GossipResourceLock ¶
func (c *Cluster) GossipResourceLock(resourceLock *ResourceLock)
func (*Cluster) GossipResponse ¶ added in v0.23.0
func (*Cluster) GossipRole ¶
func (*Cluster) GossipScript ¶ added in v0.23.0
func (*Cluster) GossipSession ¶
func (*Cluster) GossipSkill ¶ added in v0.23.0
func (*Cluster) GossipSpace ¶
func (*Cluster) GossipSpaceUsageSample ¶ added in v0.24.0
func (c *Cluster) GossipSpaceUsageSample(sample *model.SpaceUsageSample)
func (*Cluster) GossipStackDefinition ¶ added in v0.24.0
func (c *Cluster) GossipStackDefinition(stackDef *model.StackDefinition)
func (*Cluster) GossipTemplate ¶
func (*Cluster) GossipTemplateVar ¶
func (c *Cluster) GossipTemplateVar(templateVar *model.TemplateVar)
func (*Cluster) GossipToken ¶
func (*Cluster) GossipUser ¶
func (*Cluster) GossipVolume ¶
func (*Cluster) HandleLeafServer ¶
func (c *Cluster) HandleLeafServer(w http.ResponseWriter, r *http.Request)
func (*Cluster) LockResource ¶
func (*Cluster) UnlockResource ¶
type ResourceLock ¶
type ResourceLockRequestMsg ¶
type ResourceLockRequestMsg struct {
ResourceId string
}
type ResourceLockResponseMsg ¶
type ResourceLockResponseMsg struct {
UnlockToken string
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.