callback

package
v0.0.0-...-7a59755 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is a singleton that manages callbacks for events sent from Unity.

func NewManager

func NewManager(l *logger.Logger) *Manager

NewManager returns a new Manager instance. It is lazely allocated singleton which meas that the first time it is called it will allocate a Manager with the given logger but subsequent calls will just return the originaly created instance (and the logger parameter is be ignored).

func (*Manager) Run

func (m *Manager) Run(eventCode uint64, data []byte, tag uint64) error

Run runs the callback for the given event code.

func (*Manager) Set

func (m *Manager) Set(eventCode uint64, c callback.Callback) error

Set sets the callback for the given event type code. If the callback is nil, the callback for the given event type code is removed.

Jump to

Keyboard shortcuts

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