hooks

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EchoHook

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

func NewEchoHook

func NewEchoHook(logger *zap.Logger) *EchoHook

NewEchoHook creates a new LoggingHook instance

func (*EchoHook) ID

func (h *EchoHook) ID() string

ID returns the unique identifier for this hook

func (*EchoHook) Init

func (h *EchoHook) Init(config any) error

Init initializes the hook with the provided configuration

func (*EchoHook) OnMessageReceived

func (h *EchoHook) OnMessageReceived(msg []byte) []byte

OnMessageReceived logs the received message

func (*EchoHook) Provides

func (h *EchoHook) Provides(b byte) bool

Provides indicates whether this hook provides the specified functionality

func (*EchoHook) Stop

func (h *EchoHook) Stop() error

Stop gracefully stops the hook

Jump to

Keyboard shortcuts

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