Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodePrivate ¶
func EncodePrivate(privKey *ecdsa.PrivateKey) (string, error)
Types ¶
type Controller ¶
func NewController ¶
NewController return a Node controller with default parameters.
func (*Controller) Close ¶
func (c *Controller) Close() error
Close implement the Close() function of the service interface
func (*Controller) SetPluginSupervisor ¶
func (c *Controller) SetPluginSupervisor(supervisor *plugin.Supervisor)
func (*Controller) SpeedChecker ¶
func (c *Controller) SpeedChecker() error
func (*Controller) Start ¶
func (c *Controller) Start() error
Start implement the Start() function of the service interface
type Lego ¶
type Lego struct {
// contains filtered or unexported fields
}
func (*Lego) CreateCert ¶
func (*Lego) SetProvider ¶
type RemoteLogHook ¶
type RemoteLogHook struct {
// contains filtered or unexported fields
}
func NewRemoteLogHook ¶
func NewRemoteLogHook(client apiclient.NodeAPI, tag string) *RemoteLogHook
func (*RemoteLogHook) Close ¶
func (h *RemoteLogHook) Close()
func (*RemoteLogHook) Levels ¶
func (h *RemoteLogHook) Levels() []log.Level
type SyncConfig ¶
type SyncConfig struct {
// WebSocket 閰嶇疆
EnableWebSocket bool `json:"EnableWebSocket"`
WSEndpoint string `json:"WSEndpoint"`
WSEndpointFallbacks []string `json:"WSEndpointFallbacks,omitempty"`
ReconnectInterval time.Duration `json:"ReconnectInterval"`
MaxReconnectTries int `json:"MaxReconnectTries"` // 0 = 鏃犻檺閲嶈瘯
// 蹇冭烦閰嶇疆
PingInterval time.Duration `json:"PingInterval"`
PongTimeout time.Duration `json:"PongTimeout"`
// 娑堟伅閰嶇疆
AckTimeout time.Duration `json:"AckTimeout"`
BufferSize int `json:"BufferSize"`
AckRetries int `json:"AckRetries"`
// 闄嶇骇閰嶇疆
EnableFallback bool `json:"EnableFallback"`
FallbackInterval time.Duration `json:"FallbackInterval"`
}
SyncConfig 鍚屾閰嶇疆
type SyncManager ¶
type SyncManager struct {
// contains filtered or unexported fields
}
SyncManager 鍚屾绠$悊鍣?
func NewSyncManager ¶
func NewSyncManager(client apiclient.NodeAPI, controller *Controller, config *SyncConfig) *SyncManager
NewSyncManager 鍒涘缓鍚屾绠$悊鍣?
type SyncStats ¶
type SyncStats struct {
MessagesReceived int64
MessagesSent int64
ReconnectCount int64
LastConnectedAt time.Time
LastMessageAt time.Time
CurrentLatency int64 // ms
}
SyncStats 鍚屾缁熻
type User ¶
type User struct {
Email string `json:"Email"`
Registration *registration.Resource `json:"Registration"`
KeyEncoded string `json:"Key"`
// contains filtered or unexported fields
}
func (*User) DecodePrivate ¶
func (u *User) DecodePrivate(pemEncodedPriv string) (*ecdsa.PrivateKey, error)
func (*User) GetPrivateKey ¶
func (u *User) GetPrivateKey() crypto.PrivateKey
func (*User) GetRegistration ¶
func (u *User) GetRegistration() *registration.Resource
Click to show internal directories.
Click to hide internal directories.