etcd: go.etcd.io/etcd/pkg/mock/mockserver Index | Files

package mockserver

import "go.etcd.io/etcd/pkg/mock/mockserver"

Package mockserver provides mock implementations for etcdserver's server interface.

Index

Package Files

doc.go mockserver.go

type MockServer Uses

type MockServer struct {
    Network    string
    Address    string
    GrpcServer *grpc.Server
    // contains filtered or unexported fields
}

MockServer provides a mocked out grpc server of the etcdserver interface.

func (*MockServer) ResolverAddress Uses

func (ms *MockServer) ResolverAddress() resolver.Address

type MockServers Uses

type MockServers struct {
    Servers []*MockServer
    // contains filtered or unexported fields
}

MockServers provides a cluster of mocket out gprc servers of the etcdserver interface.

func StartMockServers Uses

func StartMockServers(count int) (ms *MockServers, err error)

StartMockServers creates the desired count of mock servers and starts them.

func StartMockServersOnNetwork Uses

func StartMockServersOnNetwork(count int, network string) (ms *MockServers, err error)

StartMockServersOnNetwork creates mock servers on either 'tcp' or 'unix' sockets.

func (*MockServers) StartAt Uses

func (ms *MockServers) StartAt(idx int) (err error)

StartAt restarts mock server at given index.

func (*MockServers) Stop Uses

func (ms *MockServers) Stop()

Stop stops the mock server, immediately closing all open connections and listeners.

func (*MockServers) StopAt Uses

func (ms *MockServers) StopAt(idx int)

StopAt stops mock server at given index.

Package mockserver imports 9 packages (graph). Updated 2018-08-29. Refresh now. Tools for package owners.