server

package
v0.0.0-...-e70fc09 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL