Documentation ¶
Index ¶
Constants ¶
View Source
const DeadRequestMarker = "*dead*"
View Source
const SyncPeriod = time.Duration(float32(api.DeadGracePeriod) / 2.5)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // AddCollectNotification adds a notification to the collector AddCollectNotification(fqn, encodedKeys, bucket string) // AddWriteNotification adds a notification to the writer AddWriteNotification(fqn, encodedKeys, bucket string, value *api.Value) // CollectNotifier is a runnable that notifies the collector of a new collection task CollectNotifier() NoLeaderRunnableFunc // WriteNotifier is a runnable that notifies the writer of a new writing task WriteNotifier() NoLeaderRunnableFunc // WithManager adds all the Runnables (CollectNotifier, WriteNotifier) to the manager WithManager(mgr manager.Manager) error }
func NewClient ¶
func NewClient(config ClientConfig) Client
type ClientConfig ¶
type FinalizerFunc ¶
type LeaderRunnableFunc ¶
LeaderRunnableFunc implements Runnable using a function that's run on *ONLY* on the leader. It's very important that the given function block until it's done running.
func (LeaderRunnableFunc) NeedLeaderElection ¶
func (r LeaderRunnableFunc) NeedLeaderElection() bool
NeedLeaderElection make sure the Runnable will run on every instance
type NoLeaderRunnableFunc ¶
NoLeaderRunnableFunc implements Runnable using a function that's run on every instance (not only the leader). It's very important that the given function block until it's done running.
func (NoLeaderRunnableFunc) NeedLeaderElection ¶
func (r NoLeaderRunnableFunc) NeedLeaderElection() bool
NeedLeaderElection make sure the Runnable will run on every instance
type Server ¶
type Server interface { api.FeatureManager // Collector is a runnable that collects data from the state and sends a writing notification via the WriteNotifier Collector() LeaderRunnableFunc // Writer is a runnable that writes data to the Historical Data Storage Writer() LeaderRunnableFunc // WithManager adds all the Runnables (Collector, Writer) to the manager WithManager(manager manager.Manager) error }
func NewServer ¶
func NewServer(config ServerConfig) Server
type ServerConfig ¶
type ServerConfig struct { CollectNotifier api.Notifier[api.CollectNotification] WriteNotifier api.Notifier[api.WriteNotification] Logger logr.Logger State api.State HistoricalWriter api.HistoricalWriter }
Click to show internal directories.
Click to hide internal directories.