codec

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, factory Factory)

Types

type Codec

type Codec interface {
	Init()
	Encode(event api.Event) ([]byte, error)
}

func Get

func Get(name string) (Codec, bool)

type Config

type Config struct {
	Type          string `yaml:"type,omitempty" default:"json"`
	cfg.CommonCfg `yaml:",inline"`
}

func (*Config) DeepCopy added in v1.4.0

func (c *Config) DeepCopy() *Config

func (*Config) Merge added in v1.3.0

func (c *Config) Merge(from *Config) *Config

func (*Config) Validate

func (c *Config) Validate() error

type Factory

type Factory func() Codec

type SinkCodec

type SinkCodec interface {
	SetCodec(c Codec)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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