Documentation ¶
Index ¶
- func HTTPClientFor(config *Config) (*http.Client, error)
- func TLSConfigFor(config *Config) (*tls.Config, error)
- func ToGolangMap(bytes []byte) map[string]interface{}
- func ToJsonObject(bytes []byte) gjson.Result
- type Config
- type KubernetesAnalyzer
- type KubernetesClient
- func NewKubernetesClient(url string, token string) *KubernetesClient
- func NewKubernetesClientInCluster() *KubernetesClient
- func NewKubernetesClientWithAnalyzer(url string, token string, analyzer *KubernetesAnalyzer) *KubernetesClient
- func NewKubernetesClientWithDefaultKubeConfig() *KubernetesClient
- func NewKubernetesClientWithKubeConfig(kubeConfig string) *KubernetesClient
- func (client *KubernetesClient) BindResources(pod gjson.Result, host string) ([]byte, error)
- func (client *KubernetesClient) BindingResourceStatusUrl(fullKind string, namespace string, name string) string
- func (client *KubernetesClient) CreateResource(jsonStr string) ([]byte, error)
- func (client *KubernetesClient) CreateResourceUrl(fullKind string, namespace string) string
- func (client *KubernetesClient) DeleteResource(kind string, namespace string, name string) ([]byte, error)
- func (client *KubernetesClient) DeleteResourceUrl(fullKind string, namespace string, name string) string
- func (client *KubernetesClient) GetFullKinds() []string
- func (client *KubernetesClient) GetKindDesc() []byte
- func (client *KubernetesClient) GetKinds() []string
- func (client *KubernetesClient) GetResource(kind string, namespace string, name string) ([]byte, error)
- func (client *KubernetesClient) GetResourceUrl(fullKind string, namespace string, name string) string
- func (client *KubernetesClient) Init()
- func (client *KubernetesClient) ListResources(kind string, namespace string) ([]byte, error)
- func (client *KubernetesClient) ListResourcesUrl(fullKind string, namespace string) string
- func (client *KubernetesClient) ListResourcesWithFieldSelector(kind string, namespace string, fields map[string]string) ([]byte, error)
- func (client *KubernetesClient) ListResourcesWithLabelSelector(kind string, namespace string, labels map[string]string) ([]byte, error)
- func (client *KubernetesClient) UpdateResource(jsonStr string) ([]byte, error)
- func (client *KubernetesClient) UpdateResourceStatus(jsonStr string) ([]byte, error)
- func (client *KubernetesClient) UpdateResourceStatusUrl(fullKind string, namespace string, name string) string
- func (client *KubernetesClient) UpdateResourceUrl(fullKind string, namespace string, name string) string
- func (client *KubernetesClient) WatchResource(kind string, namespace string, name string, watcher *KubernetesWatcher)
- func (client *KubernetesClient) WatchResources(kind string, namespace string, watcher *KubernetesWatcher)
- type KubernetesWatcher
- type Registry
- type RuleBase
- type WatchHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToGolangMap ¶
func ToJsonObject ¶
Types ¶
type Config ¶
type Config struct { Server string ClientCertificateData string ClientKeyData string CertificateAuthorityData string }
func NewForConfig ¶
type KubernetesAnalyzer ¶
func NewKubernetesAnalyzer ¶
func NewKubernetesAnalyzer() *KubernetesAnalyzer
func (*KubernetesAnalyzer) Learning ¶
func (analyzer *KubernetesAnalyzer) Learning(client *KubernetesClient)
type KubernetesClient ¶
type KubernetesClient struct { Url string // required, user input Token string // required, user input // contains filtered or unexported fields }
func NewKubernetesClient ¶
func NewKubernetesClient(url string, token string) *KubernetesClient
func NewKubernetesClientInCluster ¶ added in v1.1.9
func NewKubernetesClientInCluster() *KubernetesClient
returns a kubernetesClient which uses the service account kubernetes gives to pods. It's intended for clients that expect to be running inside a pod running on kubernetes.
func NewKubernetesClientWithAnalyzer ¶
func NewKubernetesClientWithAnalyzer(url string, token string, analyzer *KubernetesAnalyzer) *KubernetesClient
func NewKubernetesClientWithDefaultKubeConfig ¶
func NewKubernetesClientWithDefaultKubeConfig() *KubernetesClient
NewKubernetesClientWithDefaultKubeConfig TODO
func NewKubernetesClientWithKubeConfig ¶
func NewKubernetesClientWithKubeConfig(kubeConfig string) *KubernetesClient
NewKubernetesClientWithKubeConfig TODO
func (*KubernetesClient) BindResources ¶
BindResources TODO
func (*KubernetesClient) BindingResourceStatusUrl ¶
func (client *KubernetesClient) BindingResourceStatusUrl(fullKind string, namespace string, name string) string
func (*KubernetesClient) CreateResource ¶
func (client *KubernetesClient) CreateResource(jsonStr string) ([]byte, error)
func (*KubernetesClient) CreateResourceUrl ¶
func (client *KubernetesClient) CreateResourceUrl(fullKind string, namespace string) string
func (*KubernetesClient) DeleteResource ¶
func (*KubernetesClient) DeleteResourceUrl ¶
func (client *KubernetesClient) DeleteResourceUrl(fullKind string, namespace string, name string) string
func (*KubernetesClient) GetFullKinds ¶
func (client *KubernetesClient) GetFullKinds() []string
func (*KubernetesClient) GetKindDesc ¶
func (client *KubernetesClient) GetKindDesc() []byte
func (*KubernetesClient) GetKinds ¶
func (client *KubernetesClient) GetKinds() []string
func (*KubernetesClient) GetResource ¶
func (*KubernetesClient) GetResourceUrl ¶
func (client *KubernetesClient) GetResourceUrl(fullKind string, namespace string, name string) string
func (*KubernetesClient) Init ¶
func (client *KubernetesClient) Init()
func (*KubernetesClient) ListResources ¶
func (client *KubernetesClient) ListResources(kind string, namespace string) ([]byte, error)
func (*KubernetesClient) ListResourcesUrl ¶
func (client *KubernetesClient) ListResourcesUrl(fullKind string, namespace string) string
func (*KubernetesClient) ListResourcesWithFieldSelector ¶
func (*KubernetesClient) ListResourcesWithLabelSelector ¶
func (*KubernetesClient) UpdateResource ¶
func (client *KubernetesClient) UpdateResource(jsonStr string) ([]byte, error)
func (*KubernetesClient) UpdateResourceStatus ¶
func (client *KubernetesClient) UpdateResourceStatus(jsonStr string) ([]byte, error)
func (*KubernetesClient) UpdateResourceStatusUrl ¶
func (client *KubernetesClient) UpdateResourceStatusUrl(fullKind string, namespace string, name string) string
func (*KubernetesClient) UpdateResourceUrl ¶
func (client *KubernetesClient) UpdateResourceUrl(fullKind string, namespace string, name string) string
func (*KubernetesClient) WatchResource ¶
func (client *KubernetesClient) WatchResource(kind string, namespace string, name string, watcher *KubernetesWatcher)
func (*KubernetesClient) WatchResources ¶
func (client *KubernetesClient) WatchResources(kind string, namespace string, watcher *KubernetesWatcher)
type KubernetesWatcher ¶
type KubernetesWatcher struct { Client *KubernetesClient // contains filtered or unexported fields }
func NewKubernetesWatcher ¶
func NewKubernetesWatcher(client *KubernetesClient, handler WatchHandler) *KubernetesWatcher
func (*KubernetesWatcher) Watching ¶
func (watcher *KubernetesWatcher) Watching(url string)
type RuleBase ¶
type RuleBase struct { KindToFullKindMapper map[string][]string FullKindToApiPrefixMapper map[string]string FullKindToNameMapper map[string]string FullKindToNamespaceMapper map[string]bool FullKindToVersionMapper map[string]string FullKindToGroupMapper map[string]string FullKindToVerbsMapper map[string]interface{} }
type WatchHandler ¶
Click to show internal directories.
Click to hide internal directories.