plugins

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AlibabaOutput = "alibaba"

AlibabaOutput CRD name

View Source
const AlibabaTemplate = `` /* 401-byte string literal not displayed */

AlibabaTemplate for Alibaba OSS output plugin

View Source
const AzureOutput = "azure"

AzureOutput CRD name

View Source
const AzureTemplate = `` /* 814-byte string literal not displayed */

AzureTemplate for Azure ObjectStore output plugin

View Source
const ElasticsearchOutput = "elasticsearch"

ElasticsearchOutput CRD name

View Source
const ElasticsearchTemplate = `` /* 1065-byte string literal not displayed */

ElasticsearchTemplate for Elasticsearch output plugin

View Source
const GCSOutput = "gcs"

GCSOutput CRD name

View Source
const GCSTemplate = `` /* 656-byte string literal not displayed */

GCSTemplate for Google Cloud Storage output plugin

View Source
const LokiOutput = "loki"

LokiOutput CRD name

View Source
const LokiTemplate = `` /* 315-byte string literal not displayed */

LokiTemplate for Loki output plugin

View Source
const ParserFilter = "parser"

ParserFilter CRD name

View Source
const ParserFilterTemplate = `` /* 219-byte string literal not displayed */

ParserFilterTemplate for parser plugin

View Source
const S3Output = "s3"

S3Output CRD name

View Source
const S3Template = `` /* 1242-byte string literal not displayed */

S3Template for Amazaon S3 output plugin

Variables

View Source
var AlibabaDefaultValues = map[string]string{
	"buffer_chunk_limit":    "1m",
	"buffer_path":           "/buffers/ali",
	"time_slice_format":     "%Y%m%d",
	"time_slice_wait":       "10m",
	"oss_object_key_format": "%{time_slice}/%{host}-%{uuid}.%{file_ext}",
}

AlibabaDefaultValues for Alibaba OSS output plugin

View Source
var AzureDefaultValues = map[string]string{
	"bufferTimeKey":           "3600",
	"bufferTimeWait":          "10m",
	"bufferPath":              "/buffers/azure",
	"format":                  "json",
	"timekey":                 "1h",
	"timekey_wait":            "10m",
	"timekey_use_utc":         "true",
	"time_slice_format":       "%Y%m%d-%H",
	"azure_object_key_format": "%{path}%{time_slice}_%{index}.%{file_extension}",
	"path":                    "logs/${tag}/%Y/%m/%d/",
}

AzureDefaultValues for Azure ObjectStore output plugin

View Source
var ElasticsearchDefaultValues = map[string]string{
	"bufferPath":         "/buffers/elasticsearch",
	"logLevel":           "info",
	"logstashFormat":     "true",
	"logstashPrefix":     "logstash",
	"scheme":             "scheme",
	"sslVerify":          "true",
	"sslVersion":         "TLSv1_2",
	"chunkLimit":         "2M",
	"queueLimit":         "8",
	"timekey":            "1h",
	"timekey_wait":       "10m",
	"timekey_use_utc":    "true",
	"retry_max_interval": "30",
	"flush_interval":     "5s",
	"flush_thread_count": "2",
	"retry_forever":      "true",
	"user":               "",
	"password":           "",
}

ElasticsearchDefaultValues for Elasticsearch output plugin

View Source
var GCSDefaultValues = map[string]string{
	"bufferTimeKey":     "3600",
	"bufferTimeWait":    "10m",
	"bufferPath":        "/buffers/gcs",
	"object_key_format": "%{path}%{time_slice}_%{index}.%{file_extension}",
	"path":              "logs/${tag}/%Y/%m/%d/",
	"timekey":           "1h",
	"timekey_wait":      "10m",
	"timekey_use_utc":   "true",
	"format":            "json",
}

GCSDefaultValues for Google Cloud Storage output plugin

View Source
var LokiDefaultValues = map[string]string{
	"url":             "",
	"username":        "",
	"password":        "",
	"extraLabels":     "",
	"flushInterval":   "10s",
	"chunkLimitSize":  "1m",
	"flushAtShutdown": "true",
}

LokiDefaultValues for Loki output plugin

View Source
var ParserFilterDefaultValues = map[string]string{
	"keyName":            "log",
	"reserveData":        "true",
	"removeKeyNameField": "true",
}

ParserFilterDefaultValues for parser plugin

View Source
var S3DefaultValues = map[string]string{
	"bufferTimeKey":        "3600",
	"bufferTimeWait":       "10m",
	"bufferPath":           "/buffers/s3",
	"format":               "json",
	"timekey_use_utc":      "true",
	"s3_object_key_format": "%{path}%{time_slice}_%{index}.%{file_extension}",
}

S3DefaultValues for Amazaon S3 output plugin

Functions

func GetAll

func GetAll() map[string]Plugin

GetAll returns the plugin registry

func GetDefaultValues

func GetDefaultValues(name string) (map[string]string, error)

GetDefaultValues get default values by name

func GetTemplate

func GetTemplate(name string) (string, error)

GetTemplate get template string by name

func RegisterPlugin

func RegisterPlugin(name string, template string, values map[string]string)

RegisterPlugin to use in CRD file

Types

type Plugin

type Plugin struct {
	Template      string
	DefaultValues map[string]string
}

Plugin struct to store plugin informations

type Reconciler

type Reconciler struct {
	resources.PluginReconciler
}

Reconciler holds info what resource to reconcile

func New

func New(client client.Client, pluginList *loggingv1alpha1.PluginList, namespace string) *Reconciler

New creates a new FPlugin reconciler

func (*Reconciler) Reconcile

func (r *Reconciler) Reconcile(log logr.Logger) error

Reconcile reconciles the plugin resource

Jump to

Keyboard shortcuts

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