Documentation
¶
Index ¶
- Constants
- func GetLogger(name ...string) *log.Entry
- func InitLogger()
- type CommonResponse
- type Config
- type IOperation
- type IStore
- type JoinRequestBody
- type Operation
- type Server
- type Snapshot
- type Store
- func (s *Store) Apply(l *raft.Log) interface{}
- func (s *Store) ApplyDelete(key string) interface{}
- func (s *Store) ApplyPut(key string, value string) interface{}
- func (s *Store) Delete(key string) error
- func (s *Store) Get(key string) string
- func (s *Store) Join(id string, addr string) error
- func (s *Store) Put(key string, value string) error
- func (s *Store) Restore(rc io.ReadCloser) error
- func (s *Store) Snapshot() (raft.FSMSnapshot, error)
Constants ¶
View Source
const DEFAULT_TIMEOUT = 10 * time.Second
Variables ¶
This section is empty.
Functions ¶
func InitLogger ¶
func InitLogger()
Types ¶
type CommonResponse ¶
type CommonResponse struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { SingleNode *bool `json:"singleNode"` HttpAddr string `json:"httpAddr"` RaftAddr string `json:"raftAddr"` JoinAddr string `json:"joinAddr"` ID string `json:"id"` RaftPath string `json:"raftPath"` }
func InitConfig ¶
type IOperation ¶
type IOperation interface {
// contains filtered or unexported methods
}
type JoinRequestBody ¶
Click to show internal directories.
Click to hide internal directories.