tally

package
v0.0.0-...-7412f86 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package tally is a generated protocol buffer package.

It is generated from these files:

tally.proto

It has these top-level messages:

Content
Attribute
Location
Event

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(settings Settings) *tallyImpl

func InitSubscriber

func InitSubscriber(settings SubscriberSettings) (impl *tallySubscriberImpl, err error)

Types

type Attribute

type Attribute struct {
	Key              *string  `protobuf:"bytes,1,req,name=key" json:"key,omitempty"`
	StringValue      *string  `protobuf:"bytes,2,opt,name=string_value" json:"string_value,omitempty"`
	IntValue         *int64   `protobuf:"varint,3,opt,name=int_value" json:"int_value,omitempty"`
	DoubleValue      *float64 `protobuf:"fixed64,4,opt,name=double_value" json:"double_value,omitempty"`
	BoolValue        *bool    `protobuf:"varint,5,opt,name=bool_value" json:"bool_value,omitempty"`
	ContentValue     *Content `protobuf:"bytes,6,opt,name=content_value" json:"content_value,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

func (*Attribute) GetBoolValue

func (m *Attribute) GetBoolValue() bool

func (*Attribute) GetContentValue

func (m *Attribute) GetContentValue() *Content

func (*Attribute) GetDoubleValue

func (m *Attribute) GetDoubleValue() float64

func (*Attribute) GetIntValue

func (m *Attribute) GetIntValue() int64

func (*Attribute) GetKey

func (m *Attribute) GetKey() string

func (*Attribute) GetStringValue

func (m *Attribute) GetStringValue() string

func (*Attribute) ProtoMessage

func (*Attribute) ProtoMessage()

func (*Attribute) Reset

func (m *Attribute) Reset()

func (*Attribute) String

func (m *Attribute) String() string

type Content

type Content struct {
	Mime             *string `protobuf:"bytes,1,req,name=mime" json:"mime,omitempty"`
	Data             []byte  `protobuf:"bytes,2,req,name=data" json:"data,omitempty"`
	XXX_unrecognized []byte  `json:"-"`
}

Generalized event schema for indexing in ElasticSearch

func (*Content) GetData

func (m *Content) GetData() []byte

func (*Content) GetMime

func (m *Content) GetMime() string

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) Reset

func (m *Content) Reset()

func (*Content) String

func (m *Content) String() string

type Event

type Event struct {
	AppKey           *string      `protobuf:"bytes,1,req,name=appKey" json:"appKey,omitempty"`
	Timestamp        *float64     `protobuf:"fixed64,2,req,name=timestamp" json:"timestamp,omitempty"`
	Type             *string      `protobuf:"bytes,3,req,name=type" json:"type,omitempty"`
	Source           *string      `protobuf:"bytes,4,req,name=source" json:"source,omitempty"`
	Context          *string      `protobuf:"bytes,5,opt,name=context" json:"context,omitempty"`
	Location         *Location    `protobuf:"bytes,6,opt,name=location" json:"location,omitempty"`
	Attributes       []*Attribute `protobuf:"bytes,7,rep,name=attributes" json:"attributes,omitempty"`
	XXX_unrecognized []byte       `json:"-"`
}

func NewEvent

func NewEvent() *Event

func (*Event) GetAppKey

func (m *Event) GetAppKey() string

func (*Event) GetAttributes

func (m *Event) GetAttributes() []*Attribute

func (*Event) GetContext

func (m *Event) GetContext() string

func (*Event) GetLocation

func (m *Event) GetLocation() *Location

func (*Event) GetSource

func (m *Event) GetSource() string

func (*Event) GetTimestamp

func (m *Event) GetTimestamp() float64

func (*Event) GetType

func (m *Event) GetType() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) SetAttribute

func (this *Event) SetAttribute(key, value string)

func (*Event) SetAttributeBool

func (this *Event) SetAttributeBool(key string, value bool)

func (*Event) SetAttributeInt

func (this *Event) SetAttributeInt(key string, value int)

func (*Event) String

func (m *Event) String() string

func (*Event) ToJSON

func (this *Event) ToJSON(indent bool) (bytes []byte, err error)

type Location

type Location struct {
	Lon              *float64 `protobuf:"fixed64,1,req,name=lon" json:"lon,omitempty"`
	Lat              *float64 `protobuf:"fixed64,2,req,name=lat" json:"lat,omitempty"`
	XXX_unrecognized []byte   `json:"-"`
}

To be transformed to GeoJson - ex) {"location" : [-71.34, 41.12]} See http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-geo-point-type.html

func (*Location) GetLat

func (m *Location) GetLat() float64

func (*Location) GetLon

func (m *Location) GetLon() float64

func (*Location) ProtoMessage

func (*Location) ProtoMessage()

func (*Location) Reset

func (m *Location) Reset()

func (*Location) String

func (m *Location) String() string

type Settings

type Settings struct {
	RedisUrl     string
	RedisChannel string
}

type SubscriberSettings

type SubscriberSettings struct {
	RedisUrl       string
	RedisChannel   string
	MaxQueueLength int
}

type Tally

type Tally interface {
	Channel() chan<- *Event
	Start()
	Stop()
	Close()
}

type TallySubscriber

type TallySubscriber interface {
	Channel() <-chan interface{}
	Start()
	Queue(queue string, inbound <-chan interface{})
	Stop()
	Close()
}

Jump to

Keyboard shortcuts

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