Documentation
¶
Index ¶
- func PublishAuditLogsChanged()
- func PublishEventSinksChanged(sinkId string)
- func PublishEventSinksDeleted(sinkId string)
- func PublishGroupsChanged(groupId string)
- func PublishGroupsDeleted(groupId string)
- func PublishPoolChanged(poolId string)
- func PublishPoolDeleted(poolId string)
- func PublishRolesChanged(roleId string)
- func PublishRolesDeleted(roleId string)
- func PublishScriptsChanged(scriptId string)
- func PublishScriptsDeleted(scriptId string)
- func PublishSessionsChanged(sessionId string)
- func PublishSessionsDeleted(sessionId string)
- func PublishSkillsChanged(skillId string)
- func PublishSkillsDeleted(skillId string)
- func PublishSpaceChanged(spaceId, userId string)
- func PublishSpaceChangedWithShares(spaceId, userId string, sharedWithUserIds []string, previousUserIds []string)
- func PublishSpaceDeleted(spaceId, userId string)
- func PublishStackDefinitionsChanged(defId string)
- func PublishStackDefinitionsDeleted(defId string)
- func PublishTemplateVarsChanged(templateVarId string)
- func PublishTemplateVarsDeleted(templateVarId string)
- func PublishTemplatesChanged(templateId string)
- func PublishTemplatesDeleted(templateId string)
- func PublishTokensChanged(tokenId string)
- func PublishTokensDeleted(tokenId string)
- func PublishUsersChanged(userId string)
- func PublishUsersDeleted(userId string)
- func PublishVolumesChanged(volumeId string)
- func PublishVolumesDeleted(volumeId string)
- type Client
- type Event
- type EventType
- type Hub
- type ResourcePayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PublishAuditLogsChanged ¶
func PublishAuditLogsChanged()
PublishAuditLogsChanged notifies clients that audit logs have changed
func PublishEventSinksChanged ¶ added in v0.28.0
func PublishEventSinksChanged(sinkId string)
func PublishEventSinksDeleted ¶ added in v0.28.0
func PublishEventSinksDeleted(sinkId string)
func PublishGroupsChanged ¶
func PublishGroupsChanged(groupId string)
PublishGroupsChanged notifies clients that a group has changed
func PublishGroupsDeleted ¶
func PublishGroupsDeleted(groupId string)
PublishGroupsDeleted notifies clients that a group was deleted
func PublishPoolChanged ¶ added in v0.28.0
func PublishPoolChanged(poolId string)
PublishPoolChanged notifies clients that a pool was created, updated, or its membership/state changed. Without this, pool changes propagated via gossip never trigger a UI refresh (unlike spaces), so other servers' UIs only update on their slow poll interval.
func PublishPoolDeleted ¶ added in v0.28.0
func PublishPoolDeleted(poolId string)
func PublishRolesChanged ¶
func PublishRolesChanged(roleId string)
PublishRolesChanged notifies clients that a role has changed
func PublishRolesDeleted ¶
func PublishRolesDeleted(roleId string)
PublishRolesDeleted notifies clients that a role was deleted
func PublishScriptsChanged ¶ added in v0.23.0
func PublishScriptsChanged(scriptId string)
PublishScriptsChanged notifies clients that a script has changed
func PublishScriptsDeleted ¶ added in v0.23.0
func PublishScriptsDeleted(scriptId string)
PublishScriptsDeleted notifies clients that a script was deleted
func PublishSessionsChanged ¶
func PublishSessionsChanged(sessionId string)
PublishSessionsChanged notifies clients that a session has changed
func PublishSessionsDeleted ¶
func PublishSessionsDeleted(sessionId string)
PublishSessionsDeleted notifies clients that a session was deleted
func PublishSkillsChanged ¶ added in v0.23.0
func PublishSkillsChanged(skillId string)
PublishSkillsChanged notifies clients that a skill has changed
func PublishSkillsDeleted ¶ added in v0.23.0
func PublishSkillsDeleted(skillId string)
PublishSkillsDeleted notifies clients that a skill was deleted
func PublishSpaceChanged ¶
func PublishSpaceChanged(spaceId, userId string)
PublishSpaceChanged notifies clients that a space was created, updated, or state changed.
func PublishSpaceChangedWithShares ¶ added in v0.24.0
func PublishSpaceChangedWithShares(spaceId, userId string, sharedWithUserIds []string, previousUserIds []string)
PublishSpaceChangedWithShares includes share membership changes for clients that need to update filtered lists without a full page refresh.
func PublishSpaceDeleted ¶
func PublishSpaceDeleted(spaceId, userId string)
PublishSpaceDeleted notifies clients that a space was deleted
func PublishStackDefinitionsChanged ¶ added in v0.24.0
func PublishStackDefinitionsChanged(defId string)
PublishStackDefinitionsChanged notifies clients that a stack definition has changed
func PublishStackDefinitionsDeleted ¶ added in v0.24.0
func PublishStackDefinitionsDeleted(defId string)
PublishStackDefinitionsDeleted notifies clients that a stack definition was deleted
func PublishTemplateVarsChanged ¶
func PublishTemplateVarsChanged(templateVarId string)
PublishTemplateVarsChanged notifies clients that a template variable has changed
func PublishTemplateVarsDeleted ¶
func PublishTemplateVarsDeleted(templateVarId string)
PublishTemplateVarsDeleted notifies clients that a template variable was deleted
func PublishTemplatesChanged ¶
func PublishTemplatesChanged(templateId string)
PublishTemplatesChanged notifies clients that a template has changed
func PublishTemplatesDeleted ¶
func PublishTemplatesDeleted(templateId string)
PublishTemplatesDeleted notifies clients that a template was deleted
func PublishTokensChanged ¶
func PublishTokensChanged(tokenId string)
PublishTokensChanged notifies clients that a token has changed
func PublishTokensDeleted ¶
func PublishTokensDeleted(tokenId string)
PublishTokensDeleted notifies clients that a token was deleted
func PublishUsersChanged ¶
func PublishUsersChanged(userId string)
PublishUsersChanged notifies clients that a user has changed
func PublishUsersDeleted ¶
func PublishUsersDeleted(userId string)
PublishUsersDeleted notifies clients that a user was deleted
func PublishVolumesChanged ¶
func PublishVolumesChanged(volumeId string)
PublishVolumesChanged notifies clients that a volume has changed
func PublishVolumesDeleted ¶
func PublishVolumesDeleted(volumeId string)
PublishVolumesDeleted notifies clients that a volume was deleted
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a connected SSE client
type Event ¶
type Event struct {
Type EventType `json:"type"`
Payload interface{} `json:"payload,omitempty"`
}
Event represents an SSE event to be sent to clients
type EventType ¶
type EventType string
EventType represents the type of SSE event
const ( EventGroupsChanged EventType = "groups:changed" EventGroupsDeleted EventType = "groups:deleted" EventRolesChanged EventType = "roles:changed" EventRolesDeleted EventType = "roles:deleted" EventTemplatesChanged EventType = "templates:changed" EventTemplatesDeleted EventType = "templates:deleted" EventTemplateVarsChanged EventType = "templatevars:changed" EventTemplateVarsDeleted EventType = "templatevars:deleted" EventUsersChanged EventType = "users:changed" EventUsersDeleted EventType = "users:deleted" EventTokensChanged EventType = "tokens:changed" EventTokensDeleted EventType = "tokens:deleted" EventVolumesChanged EventType = "volumes:changed" EventVolumesDeleted EventType = "volumes:deleted" EventSessionsChanged EventType = "sessions:changed" EventSessionsDeleted EventType = "sessions:deleted" EventScriptsChanged EventType = "scripts:changed" EventScriptsDeleted EventType = "scripts:deleted" EventSkillsChanged EventType = "skills:changed" EventSkillsDeleted EventType = "skills:deleted" EventStackDefinitionsChanged EventType = "stack-definitions:changed" EventStackDefinitionsDeleted EventType = "stack-definitions:deleted" EventTunnelsChanged EventType = "tunnels:changed" EventTunnelsDeleted EventType = "tunnels:deleted" EventAuditLogsChanged EventType = "auditlogs:changed" EventEventSinksChanged EventType = "eventsinks:changed" EventEventSinksDeleted EventType = "eventsinks:deleted" // Space events for frequently changing data EventSpaceChanged EventType = "space:changed" EventSpaceDeleted EventType = "space:deleted" // Pool events EventPoolChanged EventType = "pool:changed" EventPoolDeleted EventType = "pool:deleted" // Authentication events EventAuthRequired EventType = "auth:required" )
Resource change events - *:changed for creates/updates, *:deleted for deletions
type Hub ¶
type Hub struct {
// contains filtered or unexported fields
}
Hub manages all SSE client connections and event broadcasting
func (*Hub) InvalidateSession ¶
InvalidateSession sends an auth required event to all clients with a specific session
type ResourcePayload ¶
type ResourcePayload struct {
Id string `json:"id"`
UserId string `json:"user_id,omitempty"`
PreviousUserIds []string `json:"previous_user_ids,omitempty"`
}
ResourcePayload contains data for resource-specific events