events

package
v0.0.0-...-8fcaae5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventChannel

type EventChannel struct {
	EventHandler
	// contains filtered or unexported fields
}

EventChannel defines event channel with passing events to platform.

func NewChannel

func NewChannel() *EventChannel

NewChannel contracts new EventChannel instance.

func (*EventChannel) Cancel

func (ec *EventChannel) Cancel()

Cancel closes EventChannel and executed actions assigned with SetCancel.

func (*EventChannel) SetCancel

func (ec *EventChannel) SetCancel(cancel context.CancelFunc)

SetCancel allows adding cancel action executed closing EventChannel.

func (*EventChannel) SetHandler

func (ec *EventChannel) SetHandler(handler EventHandler)

SetHandler binds platform-side EventHandler implementation to EventChannel.

type EventHandler

type EventHandler interface {
	HandleEvent(string) error
}

EventHandler defines interface for binding Event channel between platform and gomobile backend.

Jump to

Keyboard shortcuts

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