event

package
v0.0.0-...-cb472e6 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

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

func NewEvent

func NewEvent(client *mongo.Client, db string) (*Event, error)

func (*Event) List

func (e *Event) List(ctx context.Context, opts *types.ListOptions) (ch chan *types.Event, err error)

List is a wrapper to list all the data with a collection and filter. when the list is done, it will send a event with a operation type is types.ListDone. when an error occurred, the returned ch will be closed.

func (*Event) ListWatch

func (e *Event) ListWatch(ctx context.Context, opts *types.ListWatchOptions) (*types.Watcher, error)

func (*Event) Watch

func (e *Event) Watch(ctx context.Context, opts *types.WatchOptions) (*types.Watcher, error)

Jump to

Keyboard shortcuts

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