Documentation ¶
Index ¶
Constants ¶
const (
// DefaultPort is the default port number used by the SensorBee server.
DefaultPort = 15601
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Network section has parameters related to the network such as listening // ports, timeouts, etc.. Network *Network // Topologies section has information of topologies created on startup. // This section might be going to be removed when SensorBee supports // persisting topologies. Topologies Topologies // Storage section has information of storage of components in SensorBee. Storage *Storage // Logging section has parameters related to logging. Logging *Logging }
Config is a root of configuration trees.
type Logging ¶
type Logging struct { // Target is a logging target. It can be one of followings: // // - stdout // - stderr // - file path Target string `json:"target" yaml:"target"` // MinLogLevel specifies the minimum level of log entries which should // actually be written to the target. Possible levels are "debug", "info", // "warn"/"warning", "error", or "fatal". MinLogLevel string `json:"min_log_level" yaml:"min_log_level"` // LogDroppedTuples controls logging of dropped tuples. If this parameter // is true, dropped tuples are logged as JSON objects in logs. It might // affect the overall performance of the server. LogDroppedTuples bool `json:"log_dropped_tuples" yaml:"log_dropped_tuples"` // SummarizeDroppedTuples controls summarization of dropped tuples. If this // parameter is true, only a portion of a dropped tuple is logged. The data // logged looks like a JSON object but might not be able to be parsed by // JSON parsers. This parameter only works when LogDroppedTuples is true. SummarizeDroppedTuples bool `json:"summarize_dropped_tuples" yaml:"summarize_dropped_tuples"` }
Logging has configuration parameters for logging.
func NewLogging ¶
NewLogging create a Logging config parameters from a given map.
func (*Logging) CreateWriter ¶
func (l *Logging) CreateWriter() (io.WriteCloser, error)
CreateWriter creates io.Writer for loggers. When Target is a file, the writer supports log rotation using lumberjack.
type Network ¶
type Network struct { // ListenOn has binding information in "host:port" format. ListenOn string `json:"listen_on" yaml:"listen_on"` }
Network has configuration parameters related to the network.
func NewNetwork ¶
NewNetwork creates a Newtork config parameters from a given map.
type Storage ¶
type Storage struct {
UDS UDSStorage `json:"uds" yaml:"uds"`
}
Storage has storage configuration parameters for components in SensorBee.
func NewStorage ¶
NewStorage creates a Storage config parameters from a given map.
type Topologies ¶
Topologies is a set of configuration of topologies.
func NewTopologies ¶
func NewTopologies(m data.Map) (Topologies, error)
NewTopologies creates a Topologies config parameters from a given map.
func (*Topologies) ToMap ¶
func (ts *Topologies) ToMap() data.Map
ToMap returns topologies config information as data.Map.
type Topology ¶
type Topology struct { // Name is the name of the topology. This field isn't directly used // in a config file. Name string `json:"-" yaml:"-"` // BQLFile is a file path to the BQL file executed on start up. BQLFile string `json:"bql_file" yaml:"bql_file"` }
Topology has configuration parameters for a SensorBee topology.
type UDSStorage ¶
type UDSStorage struct { Type string `json:"type" yaml:"params"` Params data.Map `json:"params" yaml:"params"` }
UDSStorage has configuration parameters for the storage of UDSs.