Documentation ¶
Overview ¶
Code generated by counterfeiter. DO NOT EDIT.
Index ¶
- Constants
- Variables
- type AerospikeServer
- type DataProvider
- type FakeDataProvider
- func (fake *FakeDataProvider) FetchUsersDetails() (bool, []*aerospike.UserRoles, error)
- func (fake *FakeDataProvider) FetchUsersDetailsCallCount() int
- func (fake *FakeDataProvider) FetchUsersDetailsCalls(stub func() (bool, []*aerospike.UserRoles, error))
- func (fake *FakeDataProvider) FetchUsersDetailsReturns(result1 bool, result2 []*aerospike.UserRoles, result3 error)
- func (fake *FakeDataProvider) FetchUsersDetailsReturnsOnCall(i int, result1 bool, result2 []*aerospike.UserRoles, result3 error)
- func (fake *FakeDataProvider) Invocations() map[string][][]interface{}
- func (fake *FakeDataProvider) RequestInfo(arg1 []string) (map[string]string, error)
- func (fake *FakeDataProvider) RequestInfoArgsForCall(i int) []string
- func (fake *FakeDataProvider) RequestInfoCallCount() int
- func (fake *FakeDataProvider) RequestInfoCalls(stub func([]string) (map[string]string, error))
- func (fake *FakeDataProvider) RequestInfoReturns(result1 map[string]string, result2 error)
- func (fake *FakeDataProvider) RequestInfoReturnsOnCall(i int, result1 map[string]string, result2 error)
- type MockAerospikeServer
- type SystemInfoProvider
Constants ¶
View Source
const ( // DISK_IGNORE_NAME_LIST = "^(z?ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d$" DISK_IGNORE_NAME_LIST = "^(z?ram|loop|fd|(h|s|xv)d[a-z]|nvme\\d+n\\d+p)\\d$" // FILE_STAT_IGNORE_LIST = "^(overlay|mqueue)$" FILE_STAT_IGNORE_LIST = "^(mqueue)$" // NET_STAT_ACCEPT_LIST = "^(.*_(inerrors|inerrs)|ip_forwarding|ip(6|ext)_(inoctets|outoctets)|icmp6?_(inmsgs|outmsgs)|tcpext_(listen.*|syncookies.*|tcpsynretrans|tcptimeouts|tcpofoqueue)|tcp_(activeopens|insegs|outsegs|outrsts|passiveopens|retranssegs|currestab)|udp6?_(indatagrams|outdatagrams|noports|rcvbuferrors|sndbuferrors))$" NET_STAT_ACCEPT_LIST = "tcp_(activeopens|retranssegs|currestab)" )
View Source
const ( SECONDS_PER_TICK = 0.0001 // 1000 ticks per second // Read/write sectors are "standard UNIX 512-byte sectors" (https://www.kernel.org/doc/Documentation/block/stat.txt) DISK_SECTOR_SIZE_IN_UNIX = 512.0 ONE_KILO_BYTE = 1024 )
View Source
const ( MOCK_IK_BUILD string = "build" MOCK_IK_CLUSTER_NAME string = "cluster-name" MOCK_IK_SERVICE_CLEAR_STD string = "service-clear-std" MOCK_IK_NODE_STATISTICS string = "statistics" MOCK_IK_GET_CONFIG_CONTEXT_SERVICE string = "get-config:context=service" MOCK_IK_SETS string = "sets" MOCK_IK_NAMESPACES string = "namespaces" MOCK_IK_SINDEX string = "sindex" MOCK_IK_NAMESPACE_SLASH string = "namespace/" MOCK_IK_SINDEX_SLASH string = "sindex/" MOCK_IK_XDR_CONFIG string = "get-config:context=xdr" MOCK_IK_XDR_STATS_DC string = "get-stats:context=xdr;dc" MOCK_IK_XDR_CONFIG_DC string = "get-config:context=xdr;dc" MOCK_IK_LATENCIES string = "latencies" )
Variables ¶
View Source
var ( PROC_PATH = procfs.DefaultMountPoint SYS_PATH = "/sys" ROOTFS_PATH = "/" NET_STAT_PATH = "net/netstat" NET_DEV_STAT_PATH = "/proc/net/dev" )
View Source
var Is_Mock_Initialized = 0
read mock test data from a file
View Source
var MOCK_DATA_FILE = "mock_test_data.txt"
Functions ¶
This section is empty.
Types ¶
type AerospikeServer ¶
type AerospikeServer struct { }
Inherits DataProvider interface
func (AerospikeServer) FetchUsersDetails ¶
func (asm AerospikeServer) FetchUsersDetails() (bool, []*aero.UserRoles, error)
func (AerospikeServer) RequestInfo ¶
func (asm AerospikeServer) RequestInfo(infoKeys []string) (map[string]string, error)
type DataProvider ¶
type DataProvider interface { RequestInfo(infokeys []string) (map[string]string, error) FetchUsersDetails() (bool, []*aero.UserRoles, error) }
//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate
func GetProvider ¶
func GetProvider() DataProvider
type FakeDataProvider ¶
type FakeDataProvider struct { FetchUsersDetailsStub func() (bool, []*aerospike.UserRoles, error) RequestInfoStub func([]string) (map[string]string, error) // contains filtered or unexported fields }
func (*FakeDataProvider) FetchUsersDetails ¶
func (fake *FakeDataProvider) FetchUsersDetails() (bool, []*aerospike.UserRoles, error)
func (*FakeDataProvider) FetchUsersDetailsCallCount ¶
func (fake *FakeDataProvider) FetchUsersDetailsCallCount() int
func (*FakeDataProvider) FetchUsersDetailsCalls ¶
func (fake *FakeDataProvider) FetchUsersDetailsCalls(stub func() (bool, []*aerospike.UserRoles, error))
func (*FakeDataProvider) FetchUsersDetailsReturns ¶
func (fake *FakeDataProvider) FetchUsersDetailsReturns(result1 bool, result2 []*aerospike.UserRoles, result3 error)
func (*FakeDataProvider) FetchUsersDetailsReturnsOnCall ¶
func (*FakeDataProvider) Invocations ¶
func (fake *FakeDataProvider) Invocations() map[string][][]interface{}
func (*FakeDataProvider) RequestInfo ¶
func (fake *FakeDataProvider) RequestInfo(arg1 []string) (map[string]string, error)
func (*FakeDataProvider) RequestInfoArgsForCall ¶
func (fake *FakeDataProvider) RequestInfoArgsForCall(i int) []string
func (*FakeDataProvider) RequestInfoCallCount ¶
func (fake *FakeDataProvider) RequestInfoCallCount() int
func (*FakeDataProvider) RequestInfoCalls ¶
func (fake *FakeDataProvider) RequestInfoCalls(stub func([]string) (map[string]string, error))
func (*FakeDataProvider) RequestInfoReturns ¶
func (fake *FakeDataProvider) RequestInfoReturns(result1 map[string]string, result2 error)
func (*FakeDataProvider) RequestInfoReturnsOnCall ¶
func (fake *FakeDataProvider) RequestInfoReturnsOnCall(i int, result1 map[string]string, result2 error)
type MockAerospikeServer ¶
type MockAerospikeServer struct { Namespaces_stats []string Sets_stats []string Xdr_stats []string Node_stats []string Latencies_stats []string Sindex_stats []string Build []string Cluster_name []string Service_clear_std []string Namespaces []string Sindexes []string XdrContext []string Users []string Passone_output_str string Passone_outputs_map map[string]string }
Mock Data Provider related code, Inherits DataProvider interface
func (MockAerospikeServer) FetchUsersDetails ¶
func (mas MockAerospikeServer) FetchUsersDetails() (bool, []*aero.UserRoles, error)
func (*MockAerospikeServer) Initialize ¶
func (md *MockAerospikeServer) Initialize()
func (MockAerospikeServer) RequestInfo ¶
func (mas MockAerospikeServer) RequestInfo(infokeys []string) (map[string]string, error)
type SystemInfoProvider ¶
type SystemInfoProvider struct { }
func GetSystemProvider ¶
func GetSystemProvider() *SystemInfoProvider
func (SystemInfoProvider) GetFileFD ¶
func (sip SystemInfoProvider) GetFileFD() map[string]string
func (SystemInfoProvider) GetMemInfoStats ¶
func (sip SystemInfoProvider) GetMemInfoStats() map[string]string
func (SystemInfoProvider) GetNetDevStats ¶
func (sip SystemInfoProvider) GetNetDevStats() ([]map[string]string, []map[string]string)
func (SystemInfoProvider) GetNetStatInfo ¶
func (sip SystemInfoProvider) GetNetStatInfo() map[string]string
Click to show internal directories.
Click to hide internal directories.