interfaces

package
v3.7.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 8 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 {
	ResponseChannel() chan *structs.ResponseWithMetadata
	Configure() error
	Push(*apns2.Notification)
	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(game string, platform string, 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, game string, platform 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 KafkaMessage

type KafkaMessage struct {
	Game  string
	Topic string
	Value []byte
}

KafkaMessage sent through the Channel.

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(msg KafkaMessage)
	HandleResponses()
	LogStats()
	CleanMetadataCache()
}

MessageHandler interface for making message handlers pluggable easily.

type Queue added in v0.2.0

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

Queue interface for making new queues pluggable easily.

type StatsDClient added in v0.2.0

type StatsDClient interface {
	Incr(string, []string, float64) error
	Gauge(string, float64, []string, float64) error
	Count(string, int64, []string, float64) error
	Timing(string, time.Duration, []string, float64) error
	Close() error
}

StatsDClient interface.

type StatsReporter added in v0.2.0

type StatsReporter interface {
	InitializeFailure(game string, platform string)
	HandleNotificationSent(game string, platform string)
	HandleNotificationSuccess(game string, platform string)
	HandleNotificationFailure(game string, platform string, err *errors.PushError)
	ReportGoStats(numGoRoutines int, allocatedAndNotFreed, heapObjects, nextGCBytes, pauseGCNano uint64)
	ReportMetricGauge(metric string, value float64, game string, platform string)
	ReportMetricCount(metric string, value int64, game string, platform string)
}

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