Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Context ¶
type Context interface { // GetSpec returns the current specification of the deployment GetSpec() api.DeploymentSpec // GetStatus returns the current status of the deployment GetStatus() (api.DeploymentStatus, int32) // UpdateStatus replaces the status of the deployment with the given status and // updates the resources in k8s. UpdateStatus(status api.DeploymentStatus, lastVersion int32, force ...bool) error // GetAgencyClients returns a client connection for every agency member. // If the given predicate is not nil, only agents are included where the given predicate returns true. GetAgencyClients(ctx context.Context, predicate func(id string) bool) ([]driver.Connection, error) // GetDatabaseClient returns a cached client for the entire database (cluster coordinators or single server), // creating one if needed. GetDatabaseClient(ctx context.Context) (driver.Client, error) }
Context provides methods to the resilience package.
type Resilience ¶
type Resilience struct {
// contains filtered or unexported fields
}
Resilience is the service that inspects the overall state of the deployment to improve resilience.
func NewResilience ¶
func NewResilience(log zerolog.Logger, context Context) *Resilience
NewResilience creates a new resilience with given context.
func (*Resilience) CheckMemberFailure ¶
func (r *Resilience) CheckMemberFailure() error
CheckMemberFailure performs a check for members that should be in failed state because: - They are frequently restarted - They cannot be scheduled for a long time (TODO)
Click to show internal directories.
Click to hide internal directories.