utils

package
v2.0.0-rc4+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLogAggregator

func CreateLogAggregator(ds rv1beta2.DaemonSetInterface, sa rv1.ServiceAccountInterface, rb rrbacv1.ClusterRoleBindingInterface, cl v3.ClusterLister, clusterName, namespace string) (err error)

func GetClusterTarget

func GetClusterTarget(spec v3.ClusterLoggingSpec) string

func GetEmbeddedEndpoint

func GetEmbeddedEndpoint(deploymentLister rv1beta2.DeploymentLister, endpointLister rv1.EndpointsLister, serviceLister rv1.ServiceLister, nodeLister v3.NodeLister, k8sNodeLister rv1.NodeLister, clusterName string) (string, string, error)

func GetEmbeddedEndpointWithRetry

func GetEmbeddedEndpointWithRetry(ctx context.Context, deploymentLister rv1beta2.DeploymentLister, endpointLister rv1.EndpointsLister, serviceLister rv1.ServiceLister, clusterLoggings v3.ClusterLoggingInterface, nodeLister v3.NodeLister, k8sNodeLister rv1.NodeLister, clusterName string, logger logstream.LoggerStream) (string, string, error)

func GetProjectTarget

func GetProjectTarget(spec v3.ProjectLoggingSpec) string

func GetWrapConfig

func GetWrapConfig(es *v3.ElasticsearchConfig, sp *v3.SplunkConfig, sl *v3.SyslogConfig, kf *v3.KafkaConfig, em *v3.EmbeddedConfig) (wrapLogging WrapLogging, wem WrapEmbedded, err error)

func InitConfigMap

func InitConfigMap(cm rv1.ConfigMapInterface) error

func IniteNamespace

func IniteNamespace(ns rv1.NamespaceInterface) error

func IsAllLoggingDisable

func IsAllLoggingDisable(clusterLoggingLister v3.ClusterLoggingLister, projectLoggingLister v3.ProjectLoggingLister, currentCL *v3.ClusterLogging, currentPL *v3.ProjectLogging) (bool, error)

func UnsetConfigMap

func UnsetConfigMap(cm rv1.ConfigMapInterface, name, level string) error

func UpdateConfigMap

func UpdateConfigMap(configPath, loggingName, level string, configmaps rv1.ConfigMapInterface) error

Types

type WrapClusterLogging

type WrapClusterLogging struct {
	v3.ClusterLoggingSpec
	WrapEmbedded
	WrapLogging
}

func ToWrapClusterLogging

func ToWrapClusterLogging(clusterLogging v3.ClusterLoggingSpec) (*WrapClusterLogging, error)

func (*WrapClusterLogging) Validate

func (w *WrapClusterLogging) Validate() error

type WrapElasticsearch

type WrapElasticsearch struct {
	DateFormat string
	Host       string
	Scheme     string
}

type WrapEmbedded

type WrapEmbedded struct {
	DateFormat string
}

type WrapKafka

type WrapKafka struct {
	Brokers   string
	Zookeeper string
}

type WrapLogging

type WrapLogging struct {
	CurrentTarget string
	WrapSyslog
	WrapSplunk
	WrapElasticsearch
	WrapKafka
}

type WrapProjectLogging

type WrapProjectLogging struct {
	v3.ProjectLoggingSpec
	GrepNamespace string
	WrapLogging
}

func ToWrapProjectLogging

func ToWrapProjectLogging(grepNamespace string, projectLogging v3.ProjectLoggingSpec) (*WrapProjectLogging, error)

func (*WrapProjectLogging) Validate

func (w *WrapProjectLogging) Validate() error

type WrapSplunk

type WrapSplunk struct {
	Server string
	Scheme string
}

type WrapSyslog

type WrapSyslog struct {
	Host string
	Port string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL