interfaces

package
v2.2.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APNSPushQueue added in v0.2.0

type APNSPushQueue interface {
	// Responses chan *push.Response
	Push(string, *push.Headers, []byte)
	Close()
}

APNSPushQueue represents the contract for a APNS Push Queue

type DB added in v0.2.0

type DB interface {
	Exec(interface{}, ...interface{}) (*types.Result, error)
	ExecOne(interface{}, ...interface{}) (*types.Result, error)
	Query(interface{}, interface{}, ...interface{}) (*types.Result, error)
	Close() error
}

DB represents the contract for a Postgres DB

type FeedbackReporter added in v0.2.0

type FeedbackReporter interface {
	SendFeedback(feedback []byte)
}

FeedbackReporter interface for making new feedback reporters pluggable easily

type GCMClient

type GCMClient interface {
	SendXMPP(gcm.XMPPMessage) (string, int, error)
	Close() error
}

GCMClient represents the contract for a GCM Client

type InvalidTokenHandler added in v0.2.0

type InvalidTokenHandler interface {
	HandleToken(token string) error
}

InvalidTokenHandler interface for defining functions that handle invalid tokens easily pluggable

type KafkaConsumerClient added in v0.2.0

type KafkaConsumerClient interface {
	SubscribeTopics([]string, kafka.RebalanceCb) error
	Events() chan kafka.Event
	Assign([]kafka.TopicPartition) error
	Unassign() error
	Close() error
}

KafkaConsumerClient interface

type KafkaProducerClient added in v0.2.0

type KafkaProducerClient interface {
	Events() chan kafka.Event
	ProduceChannel() chan *kafka.Message
}

KafkaProducerClient interface

type MessageHandler added in v0.2.0

type MessageHandler interface {
	HandleMessages(msgChan *chan []byte)
	HandleResponses()
	LogStats()
}

MessageHandler interface for making message handlers pluggable easily

type Queue added in v0.2.0

type Queue interface {
	MessagesChannel() *chan []byte
	ConsumeLoop() error
	StopConsuming()
	PendingMessagesWaitGroup() *sync.WaitGroup
}

Queue interface for making new queues pluggable easily

type StatsDClient added in v0.2.0

type StatsDClient interface {
	Increment(string)
	Gauge(string, interface{})
	Timing(string, interface{})
	Close()
}

StatsDClient interface

type StatsReporter added in v0.2.0

type StatsReporter interface {
	HandleNotificationSent()
	HandleNotificationSuccess()
	HandleNotificationFailure(*errors.PushError)
	ReportGoStats(numGoRoutines int, allocatedAndNotFreed, heapObjects, nextGCBytes, pauseGCNano uint64)
}

StatsReporter interface for making stats reporters pluggable easily

Jump to

Keyboard shortcuts

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