Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrClusterFrozen = errors.New("cluster is frozen") ErrDatabaseOffline = errors.New("database is offline") ErrPeerNotCaughtUp = errors.New("peer is not caught up") )
View Source
var TimeNow = func() time.Time { return time.Now().UTC() }
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Role Role `json:"role"` Upstream *discoverd.Instance `json:"upstream"` Downstream *discoverd.Instance `json:"downstream"` State *State `json:"state"` }
func (*Config) IsNewDownstream ¶
type DatabaseEvent ¶
type Discoverd ¶
type Discoverd interface { SetState(*DiscoverdState) error Events() <-chan *DiscoverdEvent }
type DiscoverdEvent ¶
type DiscoverdEvent struct { Kind DiscoverdEventKind Peers []*discoverd.Instance State *DiscoverdState }
type DiscoverdEventKind ¶
type DiscoverdEventKind int
const ( DiscoverdEventInit DiscoverdEventKind = iota DiscoverdEventState DiscoverdEventPeers )
type DiscoverdState ¶
type FreezeDetails ¶
func NewFreezeDetails ¶
func NewFreezeDetails(reason string) *FreezeDetails
type Peer ¶
type Peer struct {
// contains filtered or unexported fields
}
func (*Peer) SetDebugChannels ¶
func (p *Peer) SetDebugChannels(restCh, retryCh chan struct{})
type State ¶
type State struct { Generation int `json:"generation"` Freeze *FreezeDetails `json:"freeze,omitempty"` Singleton bool `json:"singleton,omitempty"` InitWAL xlog.Position `json:"init_wal"` Primary *discoverd.Instance `json:"primary"` Sync *discoverd.Instance `json:"sync"` Async []*discoverd.Instance `json:"async"` Deposed []*discoverd.Instance `json:"deposed,omitempty"` }
Click to show internal directories.
Click to hide internal directories.