Documentation
¶
Index ¶
Constants ¶
View Source
const AgentConnectedEventString = "agentConnected"
View Source
const AgentDisconnectedEventString = "agentDisconnected"
View Source
const EnvsUpdatedEventString = "envsUpdated"
View Source
const StaleRepoDataEventString = "staleRepoData"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentConnectedEvent ¶
type AgentConnectedEvent struct {
Agent ConnectedAgent `json:"agent"`
StreamingEvent
}
type AgentDisconnectedEvent ¶
type AgentDisconnectedEvent struct {
Agent ConnectedAgent `json:"agent"`
StreamingEvent
}
type AgentHub ¶
type AgentHub struct {
Agents map[string]*ConnectedAgent
// Register requests from the agents.
Register chan *ConnectedAgent
// Unregister requests from agents.
Unregister chan *ConnectedAgent
// contains filtered or unexported fields
}
AgentHub is the central registry of all connected agents
func NewAgentHub ¶
func (*AgentHub) ForceStateSend ¶
func (h *AgentHub) ForceStateSend()
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a middleman between the websocket connection and the hub.
type ClientHub ¶
type ClientHub struct {
// Registered clients.
Clients map[*Client]bool
// Updates to be broadcasted to the clients.
Broadcast chan []byte
// Register requests from the clients.
Register chan *Client
// Unregister requests from clients.
Unregister chan *Client
}
ClientHub maintains the set of active clients and broadcasts messages to the clients.
func NewClientHub ¶
func NewClientHub() *ClientHub
type ConnectedAgent ¶
type ConnectedAgent struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
EventChannel chan []byte `json:"-"`
Stacks []*api.Stack `json:"-"`
}
ConnectedAgent represents a connected k8s cluster
func (*ConnectedAgent) RepoStacks ¶
func (a *ConnectedAgent) RepoStacks(repo string) []*api.Stack
type EnvsUpdatedEvent ¶
type EnvsUpdatedEvent struct {
Envs []*api.Env `json:"envs"`
StreamingEvent
}
type StaleRepoDataEvent ¶
type StaleRepoDataEvent struct {
Repo string `json:"repo"`
StreamingEvent
}
type StreamingEvent ¶
type StreamingEvent struct {
Event string `json:"event"`
}
Click to show internal directories.
Click to hide internal directories.