Documentation ¶
Index ¶
- func StringIncludes(check string, shouldInclude []string) bool
- func StructToMap(obj interface{}) (map[string]interface{}, error)
- func WriteSSHEvents(sshMonitor *SSHMonitor, analytics Analytics, userID string, ...) error
- type Analytics
- type EventName
- type Properties
- type SSData
- type SSHAnalytics
- type SSHAnalyticsOnChangeTask
- type SSHAnalyticsSSHPing
- type SSHAnalyticsStore
- type SSHMonitor
- type SegmentClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringIncludes ¶
returns true if empty list provided
func StructToMap ¶
func WriteSSHEvents ¶
Types ¶
type Analytics ¶
type Analytics interface {
TrackUserEvent(eventName EventName, userID string, properties Properties) error
}
type Properties ¶
type Properties map[string]interface{}
type SSData ¶
type SSData struct { NetID string `json:"netId"` State string `json:"state"` RecvQ string `json:"recvQ"` SendQ string `json:"sendvQ"` LocalAddressPort string `json:"localAddressPort"` PeerAddressPort string `json:"peerAddressPort"` }
func RowStrToSSRow ¶
type SSHAnalytics ¶
type SSHAnalytics struct { SSHMonitor *SSHMonitor Analytics Analytics Store SSHAnalyticsStore // contains filtered or unexported fields }
func (SSHAnalytics) Configure ¶
func (s SSHAnalytics) Configure() error
func (*SSHAnalytics) DoOnSSHChange ¶
func (s *SSHAnalytics) DoOnSSHChange(action func() error) error
func (*SSHAnalytics) WriteSSHEvents ¶
func (s *SSHAnalytics) WriteSSHEvents() error
type SSHAnalyticsOnChangeTask ¶
type SSHAnalyticsOnChangeTask struct {
SSHAnalytics
}
func (SSHAnalyticsOnChangeTask) GetTaskInterval ¶
func (s SSHAnalyticsOnChangeTask) GetTaskInterval() string
func (*SSHAnalyticsOnChangeTask) Run ¶
func (s *SSHAnalyticsOnChangeTask) Run() error
type SSHAnalyticsSSHPing ¶
type SSHAnalyticsSSHPing struct {
SSHAnalytics
}
func (SSHAnalyticsSSHPing) GetTaskInterval ¶
func (s SSHAnalyticsSSHPing) GetTaskInterval() string
func (*SSHAnalyticsSSHPing) Run ¶
func (s *SSHAnalyticsSSHPing) Run() error
type SSHAnalyticsStore ¶
type SSHMonitor ¶
type SSHMonitor struct {
// contains filtered or unexported fields
}
func NewSSHMonitor ¶
func NewSSHMonitor() *SSHMonitor
func (SSHMonitor) GetAllConnections ¶
func (c SSHMonitor) GetAllConnections(include ...string) ([]string, error)
func (SSHMonitor) GetSSHConnections ¶
func (c SSHMonitor) GetSSHConnections() ([]SSData, error)
func (*SSHMonitor) GetSSHSessionEvents ¶
func (c *SSHMonitor) GetSSHSessionEvents() (EventName, error)
type SegmentClient ¶
type SegmentClient struct {
Client analytics.Client
}
func NewSegmentClient ¶
func NewSegmentClient(writeAPIKey string) SegmentClient
func (SegmentClient) TrackUserEvent ¶
func (s SegmentClient) TrackUserEvent(eventName EventName, userID string, properties Properties) error
func (SegmentClient) TrackUserWorkspaceEvent ¶
func (s SegmentClient) TrackUserWorkspaceEvent(eventName EventName, userID string, workspace *entity.Workspace, extraProps Properties) error
Click to show internal directories.
Click to hide internal directories.