eqlog

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 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 EQLog

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

EQLog represents a eqlog connection

func New

func New(ctx context.Context, config config.EQLog) (*EQLog, error)

New creates a new eqlog connect

func (*EQLog) Connect

func (t *EQLog) Connect(ctx context.Context) error

Connect establishes a new connection with EQLog

func (*EQLog) Disconnect

func (t *EQLog) Disconnect(ctx context.Context) error

Disconnect stops a previously started connection with EQLog. If called while a connection is not active, returns nil

func (*EQLog) IsConnected

func (t *EQLog) IsConnected() bool

IsConnected returns if a connection is established

func (*EQLog) Send

func (t *EQLog) Send(ctx context.Context, source string, author string, channelID int, message string, optional string) error

Send attempts to send a message through EQLog.

func (*EQLog) Subscribe

func (t *EQLog) Subscribe(ctx context.Context, onMessage func(interface{}) error) error

Subscribe listens for new events on eqlog

Jump to

Keyboard shortcuts

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