config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudPubSubSink added in v0.2.0

type CloudPubSubSink struct {
	Name, Project, Topic, Device string
	RateLimit                    *RateLimit
	Creds                        *google.Credentials
}

type Config

type Config struct {
	Adapter string
	Sinks   []Sink
}

Config contains the full parsed configuration for the application.

func Read

func Read(configPath string) (*Config, error)

Read reads a configuration file defined in config_format.go and parses it into easily digestable Config struct.

type MQTTSink

type MQTTSink struct {
	Name, Topic, ClientID, UserName, Password string
	Format                                    PublicationFormat
	RateLimit                                 *RateLimit
	ServerName                                string
	ServerPort                                int
	TLSConfig                                 *tls.Config
}

MQTTSink is configuration for the sink.MQTTSink.

type PublicationFormat

type PublicationFormat int

PublicationFormat represents format of message published on MQTT topic.

const (
	// BINARY means data is a proto serialized to binary.
	BINARY PublicationFormat = iota

	// JSON means data is in json format.
	JSON
)

type RateLimit

type RateLimit struct {
	Max1In time.Duration
}

RateLimit is configruation for the rate limiting of sinks.

type Sink

type Sink interface{}

Sink represents the configuration for Sink.

type StdoutSink

type StdoutSink struct {
	Name      string
	RateLimit *RateLimit
}

StdoutSink is configuration for sink.StdoutSink.

Jump to

Keyboard shortcuts

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