views

package
v0.0.0-...-3fe642c Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrProcessing returned when a view is already rebuilding.
	ErrProcessing = errors.New("View is already processing")
	// ErrClosed returned when a view has been shutdown and is no longer servicing
	// requests.
	ErrClosed = errors.New("View is not current running")
)

Functions

This section is empty.

Types

type OpenPolls

type OpenPolls struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

OpenPolls keeps a cache of the current open polls

func NewOpenPolls

func NewOpenPolls(
	eventStore eventstore.EventStore,
) (*OpenPolls, error)

NewOpenPolls creates a new NewOpenPolls

func (*OpenPolls) Close

func (o *OpenPolls) Close() error

Close implements io.Closer, unsubscribes from EventManager and shuts down goroutine.

func (*OpenPolls) List

func (o *OpenPolls) List() []interface{}

List returns list of currently open polls

func (*OpenPolls) Rebuild

func (o *OpenPolls) Rebuild() (err error)

Rebuild triggers the view to rebuild

Jump to

Keyboard shortcuts

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