output

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2016 License: MIT Imports: 15 Imported by: 1

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
	// contains filtered or unexported fields
}

func NewElasticsearch

func NewElasticsearch(config *ElasticsearchConfig) *Elasticsearch

func (*Elasticsearch) PutRecord

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

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"`
	UidField string `description:"copied as id into into _uid, which consists of 'type#id'"`
}

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 `description:"server urls following the format from: http://godoc.org/labix.org/v2/mgo#Dial"`
	Database    string `description:"database name"`
	Collection  string `description:"collection name"`
	Safe        bool   `description:"sets the session safe mode: http://godoc.org/labix.org/v2/mgo#Session.SetSafe"`
	KillOnError bool   `description:"if true the server will die on any error, excep duplicate key error."`
}

Jump to

Keyboard shortcuts

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