output

package
v0.0.4-rc1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dummy

type Dummy struct {
	// contains filtered or unexported fields
}

func NewDummy

func NewDummy(config *DummyConfig) *Dummy

func (*Dummy) PutRecord

func (o *Dummy) PutRecord(record intf.Record) bool

func (*Dummy) SetConfig

func (o *Dummy) SetConfig(config *DummyConfig)

type DummyConfig

type DummyConfig struct {
	Print bool
}

type Elasticsearch

type Elasticsearch struct {
	HTTP
}

func NewElasticsearch

func NewElasticsearch(config *ElasticsearchConfig) *Elasticsearch

func (*Elasticsearch) TransformConfig

func (o *Elasticsearch) TransformConfig(config *ElasticsearchConfig) *HTTPConfig

type ElasticsearchConfig

type ElasticsearchConfig struct {
	Host    string `default:"localhost" description:"elastic host port "`
	Port    int    `default:"9200" description:"elastic search port "`
	Index   string `description:"index name"`
	Type    string `description:"index type"`
	Timeout int    `default:"1" description:"contection timeout"`
}

type HTTP

type HTTP struct {
	// contains filtered or unexported fields
}

func NewHTTP

func NewHTTP(config *HTTPConfig) *HTTP

func (*HTTP) PutRecord

func (o *HTTP) PutRecord(record intf.Record) bool

func (*HTTP) SetConfig

func (o *HTTP) SetConfig(config *HTTPConfig)

type HTTPConfig

type HTTPConfig struct {
	Url         string   `description:"url of the request"`
	Format      string   `default:"form" description:"format of the request body (json or form)"`
	ContentType string   `default:"application/x-www-form-urlencoded" description:"Content-Type header"`
	Method      string   `default:"POST" description:"request method"`
	Timeout     int      `default:"1" description:"contection timeout"`
	Header      []string `description:"additional headers, format: header,value"`
}

type Mongo

type Mongo struct {
	// contains filtered or unexported fields
}

func NewMongo

func NewMongo(config *MongoConfig) *Mongo

func (*Mongo) Connect

func (o *Mongo) Connect()

func (*Mongo) PutRecord

func (o *Mongo) PutRecord(record intf.Record) bool

func (*Mongo) SetConfig

func (o *Mongo) SetConfig(config *MongoConfig)

type MongoConfig

type MongoConfig struct {
	Url        string
	Database   string
	Collection string
	Safe       bool
}

Jump to

Keyboard shortcuts

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