datastore

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2016 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToBigEndianString

func ToBigEndianString(i int) string

sprintf("%04d", i)

Types

type ERHits added in v1.3.0

type ERHits struct {
	Total    int           `json:"total"`
	MaxScore float32       `json:"max_score"`
	Hits     []ERSearchHit `json:"hits"`
}

type ERQuery added in v1.3.0

type ERQuery struct {
	Sort  []map[string]map[string]string                            `json:"sort"`
	Query map[string]map[string][]map[string]map[string]interface{} `json:"query"`
}

type ERSearchHit added in v1.3.0

type ERSearchHit struct {
	Index  string        `json:"_index"`
	Type   string        `json:"_type"`
	ID     string        `json:"_id"`
	Score  float32       `json:"_score"`
	Source IndexResponse `json:"_source"`
}

type ERShards added in v1.3.0

type ERShards struct {
	Total      int `json:"total"`
	Successful int `json:"successful"`
	Failed     int `json:"failed"`
}

type ElasticResponse added in v1.3.0

type ElasticResponse struct {
	Took     int      `json:"took"`
	TimedOut bool     `json:"timed_out"`
	Shards   ERShards `json:"_shards"`
	Hits     ERHits   `json:"hits"`
}

ElasticResponse is the struct we unmarshal the response from an ElasticSearch query to.

type IndexManager

type IndexManager struct {
	IndexQueue *queue.Queue
	// contains filtered or unexported fields
}

func (*IndexManager) Init

func (im *IndexManager) Init(bootstrap bool)

func (*IndexManager) Start

func (im *IndexManager) Start(wg *sync.WaitGroup)

type IndexResponse

type IndexResponse struct {
	Path   string `json:"path"`
	Depth  int    `json:"depth"`
	Tenant string `json:"tenant"`
	Leaf   bool   `json:"leaf"`
}

IndexResponse defines the individual elements returned as an array by "GET /paths".

type MetricManager

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

func (*MetricManager) Init

func (mm *MetricManager) Init(bootstrap bool, im IndexManager)

func (*MetricManager) Start

func (mm *MetricManager) Start(wg *sync.WaitGroup)

type MetricResponse

type MetricResponse struct {
	From   int64                    `json:"from"`
	To     int64                    `json:"to"`
	Step   int64                    `json:"step"`
	Series map[string][]interface{} `json:"series"`
}

MetricResponse defines the response structure that will be converted into JSON before being returned.

Jump to

Keyboard shortcuts

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