common

package
v0.0.0-...-49fa6d7 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BufferWhenFullBlock      = "block"
	BufferWhenFullDropNewest = "drop_newest"
)
View Source
const (
	CodecJSON              = "json"
	TimeStampFormatRFC3339 = "rfc3339"
)

Variables

This section is empty.

Functions

func GetKey

func GetKey(secret *corev1.Secret, key string) (data []byte, ok bool)

GetKey if found return value and ok=true, else ok=false

func HasAwsCredentialsKey

func HasAwsCredentialsKey(secret *corev1.Secret) bool

func HasAwsRoleArnKey

func HasAwsRoleArnKey(secret *corev1.Secret) bool

func HasKeys

func HasKeys(secret *corev1.Secret, keys ...string) bool

HasKeys true if all keys are present.

Types

type Acknowledgments

type Acknowledgments struct {
	ID      string
	Enabled bool
}

func NewAcknowledgments

func NewAcknowledgments(id string, s ConfigStrategy) Acknowledgments

func (Acknowledgments) Name

func (a Acknowledgments) Name() string

func (Acknowledgments) Template

func (a Acknowledgments) Template() string

type Batch

type Batch struct {
	ComponentID string
	MaxBytes    helpers.OptionalPair
	MaxEvents   helpers.OptionalPair
	TimeoutSec  helpers.OptionalPair
}

func NewBatch

func NewBatch(id string, s ConfigStrategy) Batch

func (Batch) Name

func (b Batch) Name() string

func (Batch) Template

func (b Batch) Template() string

type Buffer

type Buffer struct {
	ComponentID string

	Type      helpers.OptionalPair
	WhenFull  helpers.OptionalPair
	MaxEvents helpers.OptionalPair
	MaxSize   helpers.OptionalPair
}

func NewBuffer

func NewBuffer(id string, s ConfigStrategy) Buffer

func (Buffer) Name

func (b Buffer) Name() string

func (Buffer) Template

func (b Buffer) Template() string

type ConfigStrategy

type ConfigStrategy interface {
	VisitAcknowledgements(a Acknowledgments) Acknowledgments
	VisitBatch(b Batch) Batch
	VisitRequest(r Request) Request
	VisitBuffer(b Buffer) Buffer

	// VisitSink allows setting top-level sink parameters
	VisitSink(s SinkConfig)
}

ConfigStrategy abstracts the generator specific sections from the domain

type Encoding

type Encoding struct {
	ID    string
	Codec helpers.OptionalPair
	//ExceptFields is a VRL acceptable List
	ExceptFields    helpers.OptionalPair
	TimeStampFormat helpers.OptionalPair
}

func NewEncoding

func NewEncoding(id, codec string, inits ...func(*Encoding)) Encoding

func (Encoding) Name

func (e Encoding) Name() string

func (Encoding) Template

func (e Encoding) Template() string

type Request

type Request struct {
	ComponentID            string
	RetryAttempts          helpers.OptionalPair
	RetryInitialBackoffSec helpers.OptionalPair
	RetryMaxDurationSec    helpers.OptionalPair
	Concurrency            helpers.OptionalPair
	TimeoutSecs            helpers.OptionalPair
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(id string, s ConfigStrategy) *Request

NewRequest section for an output Ref: LOG-4536 for RetryAttempts default

func (*Request) Headers

func (r *Request) Headers() elements.KeyVal

func (*Request) Name

func (r *Request) Name() string

func (*Request) SetHeaders

func (r *Request) SetHeaders(headers map[string]string)

func (*Request) Template

func (r *Request) Template() string

type RootMixin

type RootMixin struct {
	Compression helpers.OptionalPair
}

func NewRootMixin

func NewRootMixin(compression interface{}) RootMixin

type SinkConfig

type SinkConfig interface {

	// SetCompression of the sink
	SetCompression(algo string)
}

SinkConfig is an abstraction to set common root level configuration parameters of a sink (e.g. compression) Not all sinks may support all parameters

type VectorSecret

type VectorSecret struct {
	framework.ComponentID
	Desc     string
	BasePath string
}

func NewVectorSecret

func NewVectorSecret() VectorSecret

func (VectorSecret) Name

func (sec VectorSecret) Name() string

func (VectorSecret) Template

func (sec VectorSecret) Template() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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