Documentation
¶
Index ¶
- func AbortRedist(t *testing.T, hostip string)
- func AddProxyConfig(file string, config string) error
- func AddRemoveProxyConfigValue(file string, config string, parentConfig string, adflag bool, hostip string) error
- func ApproxEqual(v1 uint32, v2 uint32, epsilon uint32) bool
- func CheckLog(t *testing.T, hostip string, grepstr string, inProxy bool) error
- func CopyCtlMgr(hostip string)
- func CreateAndValidate(c client.IClient, key []byte, inputData []byte, lifetime uint32, ...) error
- func DestroyAndValidate(c client.IClient, key []byte, expect_err error) error
- func ETCDSSDeleteRecord(ssNodes []server.SSNode, ns string, key []byte)
- func ETCDSSGetRecord(ssNodes []server.SSNode, ns string, key []byte, inputData []byte, ...) (err error, noNode bool)
- func EtcdStartSecondHost(t *testing.T, start int)
- func FinalizeConfig(t *testing.T, hostip string)
- func FinishForwardCheck(t *testing.T, hostip string)
- func GenerateRandomKey(n int) []byte
- func GetProxyConfigValue(file string, config string, parentConfig string, hostip string) (string, error)
- func GetRecord(c client.IClient, key []byte, inputData []byte, lifetime uint32, ...) error
- func GetRecordUpdateTTL(c client.IClient, key []byte, inputData []byte, newLifetime uint32, ...) error
- func GetUpdatedShardNodes(oldNodes []server.SSNode, newNodes []server.SSNode) ([]server.SSNode, []server.SSNode)
- func HaveSameOriginator(ctx1 client.IContext, ctx2 client.IContext) bool
- func LoadInitConfig(hostip string)
- func NewTimeKeeper() *timeKeeper
- func PrintStatus(funcname string, params *mock.MockParams, err error)
- func ReInitializeCluster(config server.ClusterConfig) (c *server.Cluster)
- func RemoveLog(t *testing.T, hostip string, inProxy bool) error
- func RemoveProxyConfig(file string, config string) error
- func ResolveHostIp() string
- func RestartETCD(t *testing.T, hostip string)
- func ResumeAbortedReq(t *testing.T, hostip string)
- func RunlimitsConfig(t *testing.T, hostip string)
- func SSRestart(hostip string, secondhost bool)
- func SSShutdown(hostip string, secondhost bool)
- func SetAndValidate(c client.IClient, key []byte, inputData []byte, lifetime uint32, ...) error
- func ShutdownETCD(t *testing.T, hostip string)
- func StartAutoRedistConfig(t *testing.T, hostip string, markdown string)
- func StartRedistConfig(t *testing.T, hostip string, markdown string)
- func TempEtcdStartFirstHost(t *testing.T, hostip string, start bool)
- func UpdateAndValidate(c client.IClient, key []byte, inputData []byte, lifetime uint32, ...) error
- func UpdateProxyConfig(file string, old string, new string, parentConfig string, hostip string) error
- func UpdateRedistConfig(t *testing.T, hostip string, connNo string, configFile string)
- func VerifyRecordInfo(recInfo client.IContext, ver uint32, ttl uint32, creationTime uint32) error
- func ZoneMarkup(t *testing.T, hostip string)
- type KVMap
- type TestConfig
- type TestServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbortRedist ¶
func AddProxyConfig ¶
func AddRemoveProxyConfigValue ¶
func AddRemoveProxyConfigValue(file string, config string, parentConfig string, adflag bool, hostip string) error
*********************************************************************
- Function to add dedicated config value in proxy config file if the
- setting is not there due to it's in default list *********************************************************************
func CopyCtlMgr ¶
func CopyCtlMgr(hostip string)
func CreateAndValidate ¶
func DestroyAndValidate ¶
func ETCDSSDeleteRecord ¶
*************************************************
- Function to delete record in old sharding node *************************************************
func ETCDSSGetRecord ¶
func ETCDSSGetRecord(ssNodes []server.SSNode, ns string, key []byte, inputData []byte, lifetime uint32, version uint32, creationTime uint32) (err error, noNode bool)
******************************************************************
- Function to get record, this is similar as GetRecord. It added
- one parameter create time so the lifetime calculation could be
- more accurate. Ideally all the GetRecord should be like this but
- we do this particularlly for ETCD as ETCD test runs with multiple
- records operation and time would be a necessary parameter. *******************************************************************
func EtcdStartSecondHost ¶
**********************************************************
- Second host means the host snapshot will be forwarded to **********************************************************
func FinishForwardCheck ¶
temporally check forward finish, all zones are snapshot_finish
func GenerateRandomKey ¶
***********************************
- Function to generate a random key ***********************************
func GetProxyConfigValue ¶
func GetProxyConfigValue(file string, config string, parentConfig string, hostip string) (string, error)
*************************************************************************
- Function to get dedicated config value in proxy config file, this value
- will be used for later recovery, if config doesn't exist, return error *************************************************************************
func GetRecord ¶
func GetRecord(c client.IClient, key []byte, inputData []byte, lifetime uint32, version uint32, expect_err error, creationTime uint32) error
*************************************************
- Function to get record and do needed validation *************************************************
func GetRecordUpdateTTL ¶
func GetRecordUpdateTTL(c client.IClient, key []byte, inputData []byte, newLifetime uint32, version uint32) error
*************************************************
- Function to get record and do needed validation *************************************************
func GetUpdatedShardNodes ¶
func GetUpdatedShardNodes(oldNodes []server.SSNode, newNodes []server.SSNode) ([]server.SSNode, []server.SSNode)
***********************************************************************
- Function to get new sharding SS node as well as old sharding SS node.
- All updated node info will be used to check record update after
- sharding redistribution done. After ETCD redistribution done, old
- sharding node won't get record update while new sharding node will. ***********************************************************************
func LoadInitConfig ¶
func LoadInitConfig(hostip string)
func NewTimeKeeper ¶
func NewTimeKeeper() *timeKeeper
func PrintStatus ¶
func PrintStatus(funcname string, params *mock.MockParams, err error)
func ReInitializeCluster ¶
func ReInitializeCluster(config server.ClusterConfig) (c *server.Cluster)
func RemoveProxyConfig ¶
func ResolveHostIp ¶
func ResolveHostIp() string
func RestartETCD ¶
func ResumeAbortedReq ¶
resume the aborted redistribution
func RunlimitsConfig ¶
func SSShutdown ¶
This definitely will be deleted as it's a temporally workaround for shutdown issue
func SetAndValidate ¶
func SetAndValidate(c client.IClient, key []byte, inputData []byte, lifetime uint32, expect_err error) error
**********************************************************
- Function to set and get record to do needed validation **********************************************************
func ShutdownETCD ¶
func StartAutoRedistConfig ¶
start auto redistribution
func StartRedistConfig ¶
start redist
func TempEtcdStartFirstHost ¶
**********************************************************
- This is a temporally function to make shutdown easier **********************************************************
func UpdateAndValidate ¶
func UpdateAndValidate(c client.IClient, key []byte, inputData []byte, lifetime uint32, expect_err error) error
***********************************************************
- Function to update and get record to do needed validation ***********************************************************
func UpdateProxyConfig ¶
func UpdateProxyConfig(file string, old string, new string, parentConfig string, hostip string) error
****************************************************************
- Function to update dedicated config value in proxy config file ****************************************************************
func UpdateRedistConfig ¶
temporally create redist info
func VerifyRecordInfo ¶
This function has to be called right after getting RecordInfo
func ZoneMarkup ¶
Types ¶
type TestConfig ¶
type TestConfig struct {
// contains filtered or unexported fields
}
func NewTestConfig ¶
func NewTestConfig() *TestConfig
*************************************************************
- Note: add/remove host test case depends on sharding info
- which depends on host/port config, please keep host number
- and port assign sequence same if you change host/port *************************************************************
func (*TestConfig) AddConfig ¶
func (tc *TestConfig) AddConfig(section string, name string, value string)
func (*TestConfig) CreateTomlFile ¶
func (tc *TestConfig) CreateTomlFile(fname string) error
func (*TestConfig) DeleteTomlFile ¶
func (tc *TestConfig) DeleteTomlFile(fname string) error
func (*TestConfig) Dump ¶
func (tc *TestConfig) Dump()
func (*TestConfig) Reset ¶
func (tc *TestConfig) Reset()
type TestServer ¶
type TestServer struct {
// contains filtered or unexported fields
}
func NewTestServer ¶
func NewTestServer(config_file_name string, ss string, proxy_port string) *TestServer