events

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPolling = time.Millisecond * time.Duration(200)

Variables

This section is empty.

Functions

func DispatchEvent

func DispatchEvent(
	ctx context.Context,
	client *cdp.Client,
	objectID runtime.RemoteObjectID,
	eventName string,
) (values.Boolean, error)

Types

type EventBroker

type EventBroker struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewEventBroker

func NewEventBroker() *EventBroker

func (*EventBroker) AddEventListener

func (broker *EventBroker) AddEventListener(event string, listener EventListener)

func (*EventBroker) AddEventStream

func (broker *EventBroker) AddEventStream(name string, stream rpcc.Stream, msg MessageFactory) error

func (*EventBroker) Close

func (broker *EventBroker) Close() error

func (*EventBroker) RemoveEventListener

func (broker *EventBroker) RemoveEventListener(event string, listener EventListener)

func (*EventBroker) Start

func (broker *EventBroker) Start() error

func (*EventBroker) Stop

func (broker *EventBroker) Stop() error

type EventListener

type EventListener func(message interface{})

type EventStream

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

type Function

type Function func() (core.Value, error)

type MessageFactory

type MessageFactory func() interface{}

type WaitTask

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

func NewEvalWaitTask

func NewEvalWaitTask(
	client *cdp.Client,
	predicate string,
	timeout time.Duration,
	polling time.Duration,
) *WaitTask

func NewWaitTask

func NewWaitTask(
	fun Function,
	timeout time.Duration,
	polling time.Duration,
) *WaitTask

func (*WaitTask) Run

func (task *WaitTask) Run() (core.Value, error)

Jump to

Keyboard shortcuts

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