-
Notifications
You must be signed in to change notification settings - Fork 4.1k
/
raft_util.go
41 lines (30 loc) · 899 Bytes
/
raft_util.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//go:build !enterprise
package raft
import (
"context"
"errors"
autopilot "github.com/hashicorp/raft-autopilot"
)
const nonVotersAllowed = false
func (b *RaftBackend) autopilotPromoter() autopilot.Promoter {
return autopilot.DefaultPromoter()
}
// AddNonVotingPeer adds a new server to the raft cluster
func (b *RaftBackend) AddNonVotingPeer(ctx context.Context, peerID, clusterAddr string) error {
return errors.New("adding non voting peer is not allowed")
}
func autopilotToAPIServerEnterprise(_ *autopilot.Server, _ *AutopilotServer) error {
return nil
}
func autopilotToAPIStateEnterprise(_ *autopilot.State, _ *AutopilotState) error {
return nil
}
func (d *Delegate) autopilotConfigExt() interface{} {
return nil
}
func (d *Delegate) autopilotServerExt(_ *FollowerState) interface{} {
return nil
}
func (d *Delegate) meta(_ *FollowerState) map[string]string {
return nil
}