Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Destination ¶
type EventSource ¶
type EventSource interface { SetStorage(EventStorage) Events() <-chan []*ReceivedEvent }
type EventStorage ¶
type EventStorage interface {
Save(context.Context, int64, ...*ReceivedEvent) error
}
type GDatastoreStorage ¶
type GDatastoreStorage struct {
ProjectID string
}
func NewGDatastoreStorage ¶
func NewGDatastoreStorage(projectID string) *GDatastoreStorage
func (*GDatastoreStorage) Delete ¶
func (s *GDatastoreStorage) Delete(ctx context.Context, events ...*ReceivedEvent) error
func (*GDatastoreStorage) Save ¶
func (s *GDatastoreStorage) Save(ctx context.Context, fireT int64, events ...*ReceivedEvent) error
type GPubSubSource ¶
type GPubSubSource struct { Topic string // PubSub topic name // contains filtered or unexported fields }
type HTTPSource ¶
func NewHTTPSource ¶
func NewHTTPSource() *HTTPSource
func (*HTTPSource) Events ¶
func (s *HTTPSource) Events() <-chan []*ReceivedEvent
func (*HTTPSource) Loop ¶
func (s *HTTPSource) Loop(ctx context.Context)
func (*HTTPSource) SetStorage ¶
func (s *HTTPSource) SetStorage(es EventStorage)
type MemoryStorage ¶
type MemoryStorage struct {
// contains filtered or unexported fields
}
func NewMemoryStorage ¶
func NewMemoryStorage() *MemoryStorage
func (*MemoryStorage) Save ¶
func (ms *MemoryStorage) Save(ctx context.Context, t int64, events ...*ReceivedEvent) error
func (*MemoryStorage) Walk ¶
func (ms *MemoryStorage) Walk(f func(int64, string, []*ReceivedEvent))
type ReceivedEvent ¶
func NewEvent ¶
func NewEvent(s EventSource, name string) *ReceivedEvent
func (ReceivedEvent) DeliveredOn ¶
func (e ReceivedEvent) DeliveredOn() time.Time
func (ReceivedEvent) ID ¶
func (e ReceivedEvent) ID() string
func (ReceivedEvent) ReceivedOn ¶
func (e ReceivedEvent) ReceivedOn() time.Time
func (*ReceivedEvent) SetDeliveredOn ¶
func (e *ReceivedEvent) SetDeliveredOn(t time.Time)
func (*ReceivedEvent) SetReceivedOn ¶
func (e *ReceivedEvent) SetReceivedOn(t time.Time)
func (*ReceivedEvent) Source ¶
func (e *ReceivedEvent) Source() EventSource
type Server ¶
type Server struct { Rules RuleMap Sources []EventSource Storage EventStorage }
func (*Server) AddSource ¶
func (e *Server) AddSource(s EventSource)
Click to show internal directories.
Click to hide internal directories.