Documentation ¶
Overview ¶
refer to
https://github.com/coreos/etcd/blob/master/raftexample/raft.go
refer to
https://github.com/coreos/etcd/blob/master/contrib/raftexample/raft.go
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewServer ¶
func NewServer(options ...ServerOptionFunc) *myCreation
Types ¶
type ServerConfigure ¶
type ServerConfigure interface { ClusterNamed(name string) ServerConfigure NodeNamed(name string) ServerConfigure DataDrived(driver string) ServerConfigure Peers(ipv4, port string) ServerConfigure GrpcHost(host string) ServerConfigure HttpHost(host string) ServerConfigure Run() }
type ServerOptionFunc ¶
type ServerOptionFunc func(sc ServerConfigure) error
func GrpcHostOption ¶
func GrpcHostOption(addr string) ServerOptionFunc
func HttpHostOption ¶
func HttpHostOption(addr string) ServerOptionFunc
func PeerHostOption ¶
func PeerHostOption(ipv4 string, port string) ServerOptionFunc
Click to show internal directories.
Click to hide internal directories.