Documentation
¶
Index ¶
- Constants
- Variables
- func GetCounterDirectory() string
- func GetCounterIdentity() string
- func GetFS() http.FileSystem
- func Refresh()
- func StartWatching(eventPublisher *pubsub.PubSub[string, Event]) *fsnotify.Watcher
- type AsyncFSM
- type Cluster
- type CounterListener
- type Event
- type FlyPeerLocator
- type LoadBalancer
- type PeerLocator
- type PersistentClusterObserver
- type ResponseForwarding
- type Server
- type ServerStatus
- type TraefikPeerLocator
- type TraefikReplicas
- type TraefikServerResponse
- type VisitorTracker
Constants ¶
View Source
const ClosedConnectionsCounter = "closed-connections"
View Source
const ClusterMessageEvent = "ClusterMessage"
View Source
const ClusterMessageTopic = "cluster-events"
View Source
const InternalTopic = "internal-events"
View Source
const NewConnectionsCounter = "newconnections"
View Source
const SourceReplicaIdKey = "Source-Replica-Id"
View Source
const StartedConnectionsCounter = "started-connections"
View Source
const Topic = "events"
View Source
const TotalClusterVisitorsActiveEvent = "TotalClusterVisitorsActive"
View Source
const TotalVisitorsEvent = "TotalVisitors"
View Source
const VisitorJoinedEvent = "VisitorJoined"
View Source
const VisitorLeftEvent = "VisitorLeft"
View Source
const VisitorsActiveEvent = "VisitorsActive"
Variables ¶
View Source
var ClusterObservabilityEnabled = false
View Source
var DoEmbed = false
Functions ¶
func GetCounterDirectory ¶
func GetCounterDirectory() string
func GetCounterIdentity ¶
func GetCounterIdentity() string
func GetFS ¶
func GetFS() http.FileSystem
Types ¶
type AsyncFSM ¶
func NewAsyncFSM ¶
func NewCustomAsyncFSM ¶
func (*AsyncFSM) CurrentState ¶
type Cluster ¶
type Cluster struct {
// contains filtered or unexported fields
}
func NewCluster ¶
func NewCluster(events *pubsub.PubSub[string, Event], clusterEventObserver *PersistentClusterObserver, cluster zmqcluster.Cluster) *Cluster
type CounterListener ¶
func NewCounterListener ¶
func NewCounterListener(events *pubsub.PubSub[string, Event]) *CounterListener
func (*CounterListener) OnNewCount ¶
func (n *CounterListener) OnNewCount(ev percounter.CountEvent)
type Event ¶
type Event struct { Timestamp string `json:"timestamp"` Name string `json:"name"` Properties map[string]interface{} `json:"properties"` }
func GetReplicasEvent ¶
func NewEventWithParam ¶
func NewEventWithReason ¶
func NewSimpleEvent ¶
type FlyPeerLocator ¶
type FlyPeerLocator struct {
// contains filtered or unexported fields
}
func NewFlyPeerLocator ¶
func NewFlyPeerLocator(flyDiscoveryDomainName string) *FlyPeerLocator
func (*FlyPeerLocator) GetMyIP ¶
func (l *FlyPeerLocator) GetMyIP() string
type LoadBalancer ¶
type LoadBalancer struct { Servers []TraefikServerResponse `json:"servers"` PassHostHeader bool `json:"passHostHeader"` ResponseForwarding ResponseForwarding `json:"responseForwarding"` }
type PeerLocator ¶
func ChoosePeerLocator ¶
func ChoosePeerLocator() PeerLocator
type PersistentClusterObserver ¶
func NewPersistentClusterObserver ¶
func NewPersistentClusterObserver(identity string, myIP string, events *pubsub.PubSub[string, Event]) *PersistentClusterObserver
func (*PersistentClusterObserver) AfterMessageReceived ¶
func (o *PersistentClusterObserver) AfterMessageReceived(peer string, msg []byte)
func (*PersistentClusterObserver) AfterMessageSent ¶
func (o *PersistentClusterObserver) AfterMessageSent(peer string, msg []byte)
type ResponseForwarding ¶
type ResponseForwarding struct {
FlushInterval string `json:"flushInterval"`
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServerWithOptions ¶
func (*Server) WaitToDrainConnections ¶
func (s *Server) WaitToDrainConnections()
type ServerStatus ¶
type TraefikPeerLocator ¶
type TraefikPeerLocator struct {
// contains filtered or unexported fields
}
func NewTraefikPeerLocator ¶
func NewTraefikPeerLocator(traetraefikServicesUrl string) *TraefikPeerLocator
func (*TraefikPeerLocator) GetMyIP ¶
func (l *TraefikPeerLocator) GetMyIP() string
type TraefikReplicas ¶
type TraefikReplicas struct { LoadBalancer LoadBalancer `json:"loadBalancer"` Status string `json:"status"` UsedBy []string `json:"usedBy"` ServerStatus ServerStatus `json:"serverStatus"` Name string `json:"name"` Provider string `json:"provider"` Type string `json:"type"` }
type TraefikServerResponse ¶
type TraefikServerResponse struct {
URL string `json:"url"`
}
type VisitorTracker ¶
func NewVisitorTracker ¶
func NewVisitorTracker(events *pubsub.PubSub[string, Event]) *VisitorTracker
func (*VisitorTracker) Joined ¶
func (v *VisitorTracker) Joined()
func (*VisitorTracker) Left ¶
func (v *VisitorTracker) Left()
Source Files
¶
Click to show internal directories.
Click to hide internal directories.