Documentation
¶
Index ¶
- func NewTree(base string) (Provider, []types.RetainObject, []DynamicValue, error)
- type BytesMetric
- type ClientConnectStatus
- type Clients
- type DynamicValue
- type MessagesStat
- type Metric
- type PacketsMetric
- type Provider
- type SessionCreatedStatus
- type SessionDeletedStatus
- type Sessions
- type SubscriptionsStat
- type TopicsStat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTree ¶
func NewTree(base string) (Provider, []types.RetainObject, []DynamicValue, error)
NewTree allocate systree provider
Types ¶
type BytesMetric ¶
BytesMetric bytes metric
type ClientConnectStatus ¶
type ClientConnectStatus struct {
Address string `json:"ipaddress"`
Username string `json:"username"`
Timestamp int64 `json:"ts"`
CleanSession bool `json:"session"`
Protocol packet.ProtocolVersion `json:"protocol"`
ConnAckCode packet.ReasonCode `json:"connack"`
}
ClientConnectStatus is argument to client connected state
type Clients ¶
type Clients interface {
Connected(id string, status *ClientConnectStatus)
Disconnected(id string, reason packet.ReasonCode, retain bool)
}
Clients Statistic of sessions
type DynamicValue ¶
type DynamicValue interface {
Topic() string
// Retained used by topics provider to get retained message when there is new subscription to given topic
Retained() *packet.Publish
// Publish used by systree update routine to publish new value when on periodic basis
Publish() *packet.Publish
}
DynamicValue interface describes states of the dynamic value
type MessagesStat ¶ added in v0.0.4
type Metric ¶
type Metric interface {
Bytes() BytesMetric
Packets() PacketsMetric
Messages() MessagesStat
}
Metric is wrap around all of metrics
type PacketsMetric ¶
PacketsMetric packets metric
type Provider ¶
type Provider interface {
SetCallbacks(types.TopicMessenger)
Metric() Metric
Topics() TopicsStat
Subscriptions() SubscriptionsStat
Clients() Clients
Sessions() Sessions
}
Provider systree provider
type SessionCreatedStatus ¶
type SessionCreatedStatus struct {
ExpiryInterval string `json:"expiryInterval,omitempty"`
WillDelay string `json:"willDelay,omitempty"`
Timestamp string `json:"timestamp"`
Clean bool `json:"clean"`
}
SessionCreatedStatus report when session status once created
type SessionDeletedStatus ¶
type SessionDeletedStatus struct {
Timestamp string `json:"timestamp"`
Reason string `json:"reason"`
}
SessionDeletedStatus report when session status once deleted
type Sessions ¶
type Sessions interface {
Created(id string, status *SessionCreatedStatus)
Removed(id string, status *SessionDeletedStatus)
}
Sessions Statistic of sessions
type SubscriptionsStat ¶
type SubscriptionsStat interface {
Subscribed()
UnSubscribed()
}
SubscriptionsStat statistic of subscriptions
Click to show internal directories.
Click to hide internal directories.