Documentation ¶
Index ¶
- Constants
- Variables
- func LoadConfig(kubeConfigPath string) (*rest.Config, error)
- type IndexerMock
- func (m *IndexerMock) ByIndex(indexName, indexedValue string) ([]interface{}, error)
- func (m *IndexerMock) FallbackNotFound()
- func (m *IndexerMock) GetByKey(key string) (interface{}, bool, error)
- func (m *IndexerMock) MockNode(ip, name string)
- func (m *IndexerMock) MockPod(ip, name, namespace, nodeIP string, owner *Owner)
- func (m *IndexerMock) MockReplicaSet(name, namespace string, owner Owner)
- func (m *IndexerMock) MockService(ip, name, namespace string)
- type Info
- type InformerInterface
- type InformerMock
- type KubeData
- type KubeDataMock
- type Owner
Constants ¶
View Source
const (
IndexIP = "byIP"
)
Variables ¶
View Source
var Data kubeDataInterface = &KubeData{}
Functions ¶
Types ¶
type IndexerMock ¶ added in v0.1.9
func SetupIndexerMocks ¶ added in v0.1.9
func SetupIndexerMocks(kd *KubeData) (pods, nodes, svc, rs *IndexerMock)
func (*IndexerMock) ByIndex ¶ added in v0.1.9
func (m *IndexerMock) ByIndex(indexName, indexedValue string) ([]interface{}, error)
func (*IndexerMock) FallbackNotFound ¶ added in v0.1.9
func (m *IndexerMock) FallbackNotFound()
func (*IndexerMock) GetByKey ¶ added in v0.1.9
func (m *IndexerMock) GetByKey(key string) (interface{}, bool, error)
func (*IndexerMock) MockNode ¶ added in v0.1.9
func (m *IndexerMock) MockNode(ip, name string)
func (*IndexerMock) MockPod ¶ added in v0.1.9
func (m *IndexerMock) MockPod(ip, name, namespace, nodeIP string, owner *Owner)
func (*IndexerMock) MockReplicaSet ¶ added in v0.1.9
func (m *IndexerMock) MockReplicaSet(name, namespace string, owner Owner)
func (*IndexerMock) MockService ¶ added in v0.1.9
func (m *IndexerMock) MockService(ip, name, namespace string)
type Info ¶
type Info struct { // Informers need that internal object is an ObjectMeta instance metav1.ObjectMeta Type string Owner Owner HostName string HostIP string // contains filtered or unexported fields }
Info contains precollected metadata for Pods, Nodes and Services. Not all the fields are populated for all the above types. To save memory, we just keep in memory the necessary data for each Type. For more information about which fields are set for each type, please refer to the instantiation function of the respective informers.
type InformerInterface ¶ added in v0.1.9
type InformerMock ¶ added in v0.1.9
type InformerMock struct { mock.Mock InformerInterface }
func (*InformerMock) GetIndexer ¶ added in v0.1.9
func (m *InformerMock) GetIndexer() cache.Indexer
type KubeData ¶
type KubeData struct {
// contains filtered or unexported fields
}
func (*KubeData) InitFromConfig ¶
type KubeDataMock ¶ added in v0.1.4
func (*KubeDataMock) InitFromConfig ¶ added in v0.1.4
func (o *KubeDataMock) InitFromConfig(kubeConfigPath string) error
Click to show internal directories.
Click to hide internal directories.