mocktest

package
v2.4.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColonSeparator = ":"
)

Variables

This section is empty.

Functions

func PostToMaster

func PostToMaster(method, url string, reqData []byte) (resp *http.Response, err error)

Types

type MockDataPartition

type MockDataPartition struct {
	PartitionID      uint64
	PersistenceHosts []string

	VolName string
	// contains filtered or unexported fields
}

type MockDataServer

type MockDataServer struct {
	TcpAddr                         string
	Zone                            string
	ClusterID                       string
	Total                           uint64
	Used                            uint64
	Available                       uint64
	CreatedPartitionWeights         uint64 //dataPartitionCnt*dataPartitionSize
	RemainWeightsForCreatePartition uint64 //all-useddataPartitionsWieghts
	CreatedPartitionCnt             uint64
	MaxWeightsForCreatePartition    uint64
	// contains filtered or unexported fields
}

func NewMockDataServer

func NewMockDataServer(addr string, zoneName string) *MockDataServer

func (*MockDataServer) Start

func (mds *MockDataServer) Start()

type MockMetaPartition

type MockMetaPartition struct {
	PartitionID uint64
	Start       uint64
	End         uint64
	Status      int8
	Cursor      uint64
	VolName     string
	Members     []proto.Peer
}

type MockMetaServer

type MockMetaServer struct {
	NodeID   uint64
	TcpAddr  string
	ZoneName string

	sync.RWMutex
	// contains filtered or unexported fields
}

func NewMockMetaServer

func NewMockMetaServer(addr string, zoneName string) *MockMetaServer

func (*MockMetaServer) Start

func (mms *MockMetaServer) Start()

Jump to

Keyboard shortcuts

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