Documentation ¶
Index ¶
Constants ¶
const ( INITIAL_DELAY_DEFAULT = 1 * time.Minute EXISTING_DELAY_DEFAULT = 45 * time.Second )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LostResourceUser ¶
type LostResourceUser struct { C chan string // DRBD resource names of resources that may be promoted. // contains filtered or unexported fields }
LostResourceUser is a struct that exposes the "may promote" state of a DRBD resource If a resource may be promoted (i.e., may be switched to Primary) after some grace period, this usually means that its user (that had the resource promoted) failed. It could also happen that the user just terminated/gets rescheduled,... It is up to the user of this API to decide. This also means that the user (e.g., some k8s pod) needs to be restarted/rescheduled. The LostResourceUser is generic, it sends the names of resources that lost their user on the channel C.
func NewLostResourceUser ¶
func NewLostResourceUser(ctx context.Context, client *client.Client, options ...Option) (*LostResourceUser, error)
NewLostResourceUser creates a new LostResourceUser. It takes a context, a Go LINSTOR client, and options as its input.
func (*LostResourceUser) Stop ¶
func (rl *LostResourceUser) Stop()
Stop terminates all helper Go routines and closes the connection to the events stream.
type Option ¶
type Option func(*LostResourceUser) error
Option represents a configuration option of the LostResourceUser