manager

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	State     ChannelState
	LastEvent time.Time
	Raw       *pb.Channel
}

func (*Channel) Update

func (c *Channel) Update(state ...ChannelState) *Channel

type ChannelState

type ChannelState string
const (
	ChannelStateWaitingLimits ChannelState = "WAITING_LIMITS"
	ChannelStateJoinRequested ChannelState = "JOIN_REQUESTED"
	ChannelStateJoined        ChannelState = "JOINED"
	ChannelStateParted        ChannelState = "PARTED"
	ChannelStateSuspended     ChannelState = "SUSPENDED"
	ChannelStateBanned        ChannelState = "BANNED"
	ChannelStateUnknown       ChannelState = "UNKNOWN"
)

type Connection

type Connection struct {
	// contains filtered or unexported fields
}

func (*Connection) ConnLength

func (c *Connection) ConnLength() int

func (*Connection) JoinChannel

func (c *Connection) JoinChannel(channel *pb.Channel)

func (*Connection) PartChannel

func (c *Connection) PartChannel(channel string)

type ConnectionOptions

type ConnectionOptions struct {
	Username string
	OAuth    string
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(gCtx global.Context, rl RateLimiter, ep EventPublish) *Manager

func (*Manager) JoinChat

func (m *Manager) JoinChat(channel *pb.Channel)

func (*Manager) PartChat

func (m *Manager) PartChat(channel *pb.Channel)

func (*Manager) SetLoginCreds

func (m *Manager) SetLoginCreds(options ConnectionOptions)

type RateLimiter

type RateLimiter func(context.Context, *pb.Channel) error

Jump to

Keyboard shortcuts

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