Documentation
¶
Index ¶
Constants ¶
View Source
const ( // The number of packets to buffer when reading off the socket. // A buffer of this size will be allocated for each instance of a UDP service. DefaultBuffer int = 1e3 )
View Source
const (
UDPPacketSize = 65536
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Enabled bool `toml:"enabled"`
BindAddress string `toml:"bind-address"`
ReadBuffer int `toml:"read-buffer"`
Buffer int `toml:"buffer"`
Database string `toml:"database"`
RetentionPolicy string `toml:"retention-policy"`
}
func (*Config) WithDefaults ¶
WithDefaults takes the given config and returns a new config with any required default values set.
type Service ¶
type Service struct {
PointsWriter interface {
WritePoints(database, retentionPolicy string, consistencyLevel models.ConsistencyLevel, points []models.Point) error
}
Logger *log.Logger
// contains filtered or unexported fields
}
Service represents here an UDP service that will listen for incoming packets formatted with the inline protocol
Click to show internal directories.
Click to hide internal directories.