instance

package
v0.0.0-...-117abf3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoScaler

type AutoScaler interface {
	AllocateChannels(channels []*pb.Channel) error
	GetChannelsForSlave(idx int) []structures.Channel
	Load() error
}

type K8S

type K8S interface {
	GetStatefulSet(ctx context.Context, name string) (*appsv1.StatefulSet, error)
	CreateStatefulSet(ctx context.Context, statefulSet appsv1.StatefulSet) (*appsv1.StatefulSet, error)
	UpdateStatefulSet(ctx context.Context, statefulSet *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
	DeleteStatefulSet(ctx context.Context, name string) error
}

type Monitoring

type Monitoring interface {
	Register(prometheus.Registerer)
	WaterHoseMaster() MonitoringWaterHoseMaster
	WaterHoseSlave() MonitoringWaterHoseSlave
}

type MonitoringWaterHoseMaster

type MonitoringWaterHoseMaster struct {
	TotalChannels prometheus.Histogram
}

type MonitoringWaterHoseSlave

type MonitoringWaterHoseSlave struct {
	TotalChannelsBannedIn    prometheus.Histogram
	TotalChannelsSuspended   prometheus.Histogram
	TotalChannelsConnectedTo prometheus.Histogram
	TotalMessages            prometheus.Histogram
}

type RateLimiter

type RateLimiter interface {
	RequestJoin(ctx context.Context, channel *pb.Channel) error
	Start()
}

type Redis

type Redis interface {
	Pipeline(ctx context.Context) rawRedis.Pipeliner
	Publish(ctx context.Context, channel string, value string) error

	RateLimitNewConnection(ctx context.Context) (bool, time.Duration, error)
	RateLimitJoin(ctx context.Context, count int) (int, time.Duration, error)

	redis.Instance
}

type Twitch

type Twitch interface {
	GetOAuth(ctx context.Context, id string) (helix.AccessCredentials, error)
	GetUser(id string) (helix.User, error)
	GetUsers(id []string) ([]helix.User, []error)
}

Jump to

Keyboard shortcuts

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