Documentation ¶
Index ¶
- Variables
- type ClusterInfoReader
- func (s *ClusterInfoReader) ApplicationInfo() (*monitor.ApplicationInfo, error)
- func (s *ClusterInfoReader) ListOfNodes() (map[string][]string, int, error)
- func (s *ClusterInfoReader) ListStorages() ([]*Storage, error)
- func (s *ClusterInfoReader) ResetCache()
- func (s *ClusterInfoReader) String() string
- func (s *ClusterInfoReader) TaskInfo(name string) (*monitor.TaskInfo, error)
- func (s *ClusterInfoReader) TaskInfoByID(id string) (*monitor.TaskInfo, error)
- type KeyValueAccessor
- type KeyValueBasic
- type KeyValueTxAccessor
- type Option
- type Options
- type Storage
- func (s *Storage) ApplicationInfo() *monitor.ApplicationInfo
- func (s *Storage) DeregisterApplication() error
- func (s *Storage) ExecuteFailoverTask(event monitor.EventType, execTime time.Duration) error
- func (s *Storage) ExecuteTask(event monitor.EventType, execTime time.Duration) error
- func (s *Storage) FailoverTaskInfo(name string) (*monitor.TaskInfo, error)
- func (s *Storage) ReceiveCount() (uint64, error)
- func (s *Storage) ReceiveEvent(event monitor.EventType) (err error)
- func (s *Storage) RegisterApplication(appInfo *monitor.ApplicationInfo) error
- func (s *Storage) TaskInfo(name string) (*monitor.TaskInfo, error)
- func (s *Storage) TaskInfoByID(id string) (*monitor.TaskInfo, error)
Constants ¶
This section is empty.
Variables ¶
var ErrNil = errors.New("nil response")
ErrNil in case of empty response
Functions ¶
This section is empty.
Types ¶
type ClusterInfoReader ¶
type ClusterInfoReader struct {
// contains filtered or unexported fields
}
ClusterInfoReader overrides group node accessing
func NewClusterInfoReader ¶
func NewClusterInfoReader(kvclient KeyValueAccessor, appName ...string) *ClusterInfoReader
NewClusterInfoReader interface implementation
func (*ClusterInfoReader) ApplicationInfo ¶
func (s *ClusterInfoReader) ApplicationInfo() (*monitor.ApplicationInfo, error)
ApplicationInfo returns application information
func (*ClusterInfoReader) ListOfNodes ¶
func (s *ClusterInfoReader) ListOfNodes() (map[string][]string, int, error)
ListOfNodes returns list of registered nodes
func (*ClusterInfoReader) ListStorages ¶
func (s *ClusterInfoReader) ListStorages() ([]*Storage, error)
ListStorages returns the list of redis storages
func (*ClusterInfoReader) ResetCache ¶
func (s *ClusterInfoReader) ResetCache()
ResetCache of the nodes
func (*ClusterInfoReader) String ¶ added in v0.4.5
func (s *ClusterInfoReader) String() string
func (*ClusterInfoReader) TaskInfo ¶
func (s *ClusterInfoReader) TaskInfo(name string) (*monitor.TaskInfo, error)
TaskInfo retuns information about the task
func (*ClusterInfoReader) TaskInfoByID ¶
func (s *ClusterInfoReader) TaskInfoByID(id string) (*monitor.TaskInfo, error)
TaskInfoByID retuns information about the particular task
type KeyValueAccessor ¶
type KeyValueAccessor interface { KeyValueBasic // Begin new transaction Begin() (KeyValueTxAccessor, error) }
KeyValueAccessor defines the accessor with transaction
type KeyValueBasic ¶
type KeyValueBasic interface { // Keys returns the list of keys with pattern "text"+* Keys(pattern string) ([]string, error) // Get value from key Get(key string) (interface{}, error) // MGet returns values from banch of keys in the same order MGet(keys ...string) ([]interface{}, error) // Incr value with key Incr(key string) (int64, error) // Set value for the key Set(key string, value interface{}, expiration ...time.Duration) error // MSet multiple set operation with {Key, Value, ...} input MSet(vals ...interface{}) error // Del keys from the storage Del(key ...string) error }
KeyValueBasic provides basic data accessors
type KeyValueTxAccessor ¶
type KeyValueTxAccessor interface { KeyValueBasic // Commit transaction changes Commit() error }
KeyValueTxAccessor defines accessor which will apply changes only after commiting
type Option ¶
type Option func(opt *Options)
Option type definition
func WithKVClient ¶
func WithKVClient(client KeyValueAccessor) Option
WithKVClient returns option modifier with KV client
func WithTaskDetailInfo ¶
WithTaskDetailInfo returns option modifier with detail task info
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options of the storage
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage monitor implementation for redis
func (*Storage) ApplicationInfo ¶
func (s *Storage) ApplicationInfo() *monitor.ApplicationInfo
ApplicationInfo returns application information
func (*Storage) DeregisterApplication ¶
DeregisterApplication info in the storage
func (*Storage) ExecuteFailoverTask ¶
ExecuteFailoverTask commits the execution event status
func (*Storage) ExecuteTask ¶
ExecuteTask commits the execution event status
func (*Storage) FailoverTaskInfo ¶
FailoverTaskInfo retuns information about the failover task
func (*Storage) ReceiveCount ¶
ReceiveCount returns count of received messages
func (*Storage) ReceiveEvent ¶
ReceiveEvent register and increments counters
func (*Storage) RegisterApplication ¶
func (s *Storage) RegisterApplication(appInfo *monitor.ApplicationInfo) error
RegisterApplication info in the storage