Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Serializer ¶
type Serializer interface { // Serialize takes a single Prometheus sample and turns it into a byte buffer. Serialize(metric model.Sample) ([]byte, error) // ADXFormat Azure Data Explorer injestion data format. ADXFormat() kusto.DataFormat }
Serializer is an interface defining functions that a serializer must satisfy.
func NewAvroJSONSerializer ¶
func NewAvroJSONSerializer() (Serializer, error)
NewAvroJSONSerializer provides a 'avro-json' Serializer
func NewJSONSerializer ¶
func NewJSONSerializer() (Serializer, error)
NewJSONSerializer provides a 'json' Serializer
func NewSerializer ¶
func NewSerializer(cfg *SerializerConfig) (Serializer, error)
NewSerializer provides a Serializer based on the given config.
Parses SerializerConfig.DataFormat string
type SerializerConfig ¶
type SerializerConfig struct { // Dataformat can be one of the serializer types listed in serializers.NewSerializer. DataFormat string }
SerializerConfig is a struct that covers the data types needed for all serializer types, and can be used to instantiate _any_ of the serializers.
Click to show internal directories.
Click to hide internal directories.