view_manager

package
v0.0.0-...-fd38b90 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithCollection

func WithCollection(collection string) func(vm *ViewManager, view *View)

func WithSubscriber

func WithSubscriber(subscriberID string) func(vm *ViewManager, view *View)

Types

type View

type View struct {
	ID         string
	Subscriber string
	Collection string
	CreatedAt  time.Time
	// contains filtered or unexported fields
}

func NewView

func NewView() *View

func (*View) Fetch

func (view *View) Fetch(lastKey []byte, afterLastKey bool) (int, error)

type ViewManager

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

func New

func New(config *configs.Config, l *zap.Logger, c *connector.Connector) *ViewManager

func (*ViewManager) CreateView

func (vm *ViewManager) CreateView(opts ...func(*ViewManager, *View)) (*View, error)

func (*ViewManager) DeleteView

func (vm *ViewManager) DeleteView(id string) error

func (*ViewManager) GetView

func (vm *ViewManager) GetView(id string) (*View, error)

Jump to

Keyboard shortcuts

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