Documentation
¶
Index ¶
- type SyncManager
- func (s *SyncManager) Apply(l *raft.Log) interface{}
- func (s *SyncManager) DeleteProjectConfig(token, projectID string) error
- func (s *SyncManager) GetConfig(projectID string) (*config.Project, error)
- func (s *SyncManager) GetGlobalConfig() *config.Config
- func (s *SyncManager) Restore(rc io.ReadCloser) error
- func (s *SyncManager) SetGlobalConfig(c *config.Config)
- func (s *SyncManager) SetProjectConfig(token string, project *config.Project) error
- func (s *SyncManager) Snapshot() (raft.FSMSnapshot, error)
- func (s *SyncManager) Start(nodeID, configFilePath, gossipPort, raftPort string, seeds []string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SyncManager ¶
type SyncManager struct {
// contains filtered or unexported fields
}
SyncManager syncs the project config between folders
func New ¶
func New(adminMan *admin.Manager) *SyncManager
New creates a new instance of the sync manager
func (*SyncManager) Apply ¶
func (s *SyncManager) Apply(l *raft.Log) interface{}
Apply applies a Raft log entry to the key-value store
func (*SyncManager) DeleteProjectConfig ¶
func (s *SyncManager) DeleteProjectConfig(token, projectID string) error
DeleteProjectConfig applies delete project config command to the raft log
func (*SyncManager) GetConfig ¶
func (s *SyncManager) GetConfig(projectID string) (*config.Project, error)
GetConfig returns the config present in the state
func (*SyncManager) GetGlobalConfig ¶
func (s *SyncManager) GetGlobalConfig() *config.Config
GetGlobalConfig gets the global config
func (*SyncManager) Restore ¶
func (s *SyncManager) Restore(rc io.ReadCloser) error
Restore stores the key-value store to a previous state.
func (*SyncManager) SetGlobalConfig ¶
func (s *SyncManager) SetGlobalConfig(c *config.Config)
SetGlobalConfig sets the global config. This must be called before the Start command.
func (*SyncManager) SetProjectConfig ¶
func (s *SyncManager) SetProjectConfig(token string, project *config.Project) error
SetProjectConfig applies the set project config command to the raft log
func (*SyncManager) Snapshot ¶
func (s *SyncManager) Snapshot() (raft.FSMSnapshot, error)
Snapshot returns a snapshot of the key-value store.
Click to show internal directories.
Click to hide internal directories.