Documentation ¶
Overview ¶
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2023, NVIDIA CORPORATION. All rights reserved.
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Package mock provides a variety of mock implementations used for testing.
- Copyright (c) 2018-2022, NVIDIA CORPORATION. All rights reserved.
Index ¶
- func NewDBDriver() kvdb.Driver
- func NewStatsTracker() stats.Tracker
- type BownerMock
- type DBDriver
- func (*DBDriver) Close() error
- func (bd *DBDriver) Delete(collection, key string) error
- func (bd *DBDriver) DeleteCollection(collection string) error
- func (bd *DBDriver) Get(collection, key string, object any) error
- func (bd *DBDriver) GetAll(collection, pattern string) (map[string]string, error)
- func (bd *DBDriver) GetString(collection, key string) (string, error)
- func (bd *DBDriver) List(collection, pattern string) ([]string, error)
- func (bd *DBDriver) Set(collection, key string, object any) error
- func (bd *DBDriver) SetString(collection, key, data string) error
- type IOS
- type StatsTracker
- func (*StatsTracker) Add(string, int64)
- func (*StatsTracker) AddMany(...cos.NamedVal64)
- func (*StatsTracker) Get(string) int64
- func (*StatsTracker) GetMetricNames() cos.StrKVs
- func (*StatsTracker) GetStats() *stats.Node
- func (*StatsTracker) Inc(string)
- func (*StatsTracker) IncErr(string)
- func (*StatsTracker) IsPrometheus() bool
- func (*StatsTracker) RegMetrics(*cluster.Snode)
- func (*StatsTracker) ResetStats(bool)
- func (*StatsTracker) StartedUp() bool
- type TargetMock
- func (*TargetMock) BMDVersionFixup(*http.Request, ...cmn.Bck)
- func (*TargetMock) Backend(*cluster.Bck) cluster.BackendProvider
- func (t *TargetMock) Bowner() cluster.Bowner
- func (*TargetMock) ByteMM() *memsys.MMSA
- func (*TargetMock) ClusterStarted() bool
- func (*TargetMock) CompareObjects(context.Context, *cluster.LOM) (bool, int, error)
- func (*TargetMock) CopyObject(*cluster.LOM, *cluster.CopyObjectParams, bool) (int64, error)
- func (*TargetMock) DataClient() *http.Client
- func (*TargetMock) DeleteObject(*cluster.LOM, bool) (int, error)
- func (*TargetMock) EvictObject(*cluster.LOM) (int, error)
- func (*TargetMock) FSHC(error, string)
- func (*TargetMock) FinalizeObj(*cluster.LOM, string, cluster.Xact) (int, error)
- func (*TargetMock) GetAllRunning(string, bool) ([]string, []string)
- func (*TargetMock) GetCold(context.Context, *cluster.LOM, cmn.OWT) (int, error)
- func (*TargetMock) HeadObjT2T(*cluster.LOM, *cluster.Snode) bool
- func (*TargetMock) Health(*cluster.Snode, time.Duration, url.Values) ([]byte, int, error)
- func (*TargetMock) NodeStarted() bool
- func (*TargetMock) OOS(*fs.CapStatus) fs.CapStatus
- func (*TargetMock) PageMM() *memsys.MMSA
- func (*TargetMock) Promote(cluster.PromoteParams) (int, error)
- func (*TargetMock) PutObject(*cluster.LOM, *cluster.PutObjectParams) error
- func (*TargetMock) RebalanceNamespace(*cluster.Snode) ([]byte, int, error)
- func (*TargetMock) SID() string
- func (*TargetMock) Sname() string
- func (*TargetMock) Snode() *cluster.Snode
- func (*TargetMock) Sowner() cluster.Sowner
- func (*TargetMock) String() string
- type XactMock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDBDriver ¶
func NewStatsTracker ¶
Types ¶
type BownerMock ¶
func NewBaseBownerMock ¶
func NewBaseBownerMock(bcks ...*cluster.Bck) *BownerMock
func (BownerMock) Get ¶
func (r BownerMock) Get() *cluster.BMD
type DBDriver ¶
type DBDriver struct {
// contains filtered or unexported fields
}
func (*DBDriver) DeleteCollection ¶
type IOS ¶ added in v1.3.16
func (*IOS) FillDiskStats ¶ added in v1.3.16
func (*IOS) FillDiskStats(ios.AllDiskStats)
func (*IOS) GetAllMpathUtils ¶ added in v1.3.16
func (*IOS) GetMpathUtil ¶ added in v1.3.16
func (*IOS) RemoveMpath ¶ added in v1.3.16
type StatsTracker ¶
type StatsTracker struct{}
func (*StatsTracker) Add ¶
func (*StatsTracker) Add(string, int64)
func (*StatsTracker) AddMany ¶
func (*StatsTracker) AddMany(...cos.NamedVal64)
func (*StatsTracker) Get ¶
func (*StatsTracker) Get(string) int64
func (*StatsTracker) GetMetricNames ¶ added in v1.3.16
func (*StatsTracker) GetMetricNames() cos.StrKVs
func (*StatsTracker) GetStats ¶ added in v1.3.16
func (*StatsTracker) GetStats() *stats.Node
func (*StatsTracker) Inc ¶ added in v1.3.16
func (*StatsTracker) Inc(string)
func (*StatsTracker) IncErr ¶ added in v1.3.16
func (*StatsTracker) IncErr(string)
func (*StatsTracker) IsPrometheus ¶
func (*StatsTracker) IsPrometheus() bool
func (*StatsTracker) RegMetrics ¶
func (*StatsTracker) RegMetrics(*cluster.Snode)
func (*StatsTracker) ResetStats ¶ added in v1.3.16
func (*StatsTracker) ResetStats(bool)
func (*StatsTracker) StartedUp ¶
func (*StatsTracker) StartedUp() bool
type TargetMock ¶
TargetMock provides cluster.Target interface with mocked return values.
func NewTarget ¶
func NewTarget(bo cluster.Bowner) *TargetMock
func (*TargetMock) BMDVersionFixup ¶
func (*TargetMock) BMDVersionFixup(*http.Request, ...cmn.Bck)
func (*TargetMock) Backend ¶
func (*TargetMock) Backend(*cluster.Bck) cluster.BackendProvider
func (*TargetMock) Bowner ¶
func (t *TargetMock) Bowner() cluster.Bowner
func (*TargetMock) ByteMM ¶
func (*TargetMock) ByteMM() *memsys.MMSA
func (*TargetMock) ClusterStarted ¶
func (*TargetMock) ClusterStarted() bool
func (*TargetMock) CompareObjects ¶
func (*TargetMock) CopyObject ¶
func (*TargetMock) CopyObject(*cluster.LOM, *cluster.CopyObjectParams, bool) (int64, error)
func (*TargetMock) DataClient ¶
func (*TargetMock) DataClient() *http.Client
func (*TargetMock) DeleteObject ¶
func (*TargetMock) EvictObject ¶
func (*TargetMock) EvictObject(*cluster.LOM) (int, error)
func (*TargetMock) FSHC ¶
func (*TargetMock) FSHC(error, string)
func (*TargetMock) FinalizeObj ¶
func (*TargetMock) GetAllRunning ¶ added in v1.3.16
func (*TargetMock) GetAllRunning(string, bool) ([]string, []string)
func (*TargetMock) HeadObjT2T ¶
func (*TargetMock) NodeStarted ¶
func (*TargetMock) NodeStarted() bool
func (*TargetMock) PageMM ¶
func (*TargetMock) PageMM() *memsys.MMSA
func (*TargetMock) Promote ¶
func (*TargetMock) Promote(cluster.PromoteParams) (int, error)
func (*TargetMock) PutObject ¶
func (*TargetMock) PutObject(*cluster.LOM, *cluster.PutObjectParams) error
func (*TargetMock) RebalanceNamespace ¶
func (*TargetMock) SID ¶
func (*TargetMock) SID() string
func (*TargetMock) Sname ¶
func (*TargetMock) Sname() string
func (*TargetMock) Snode ¶
func (*TargetMock) Snode() *cluster.Snode
func (*TargetMock) Sowner ¶
func (*TargetMock) Sowner() cluster.Sowner
func (*TargetMock) String ¶
func (*TargetMock) String() string
Click to show internal directories.
Click to hide internal directories.