sessions

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: AGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sessions is used during indexation to start/stop a session an speed-up the process

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BenchBatcher

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

func (*BenchBatcher) Flush

func (bb *BenchBatcher) Flush(ctx context.Context, dao index.DAO)

func (*BenchBatcher) Notify

func (bb *BenchBatcher) Notify(topic string, msg interface{})

func (*BenchBatcher) UpdateMPath

func (bb *BenchBatcher) UpdateMPath(path mtree.MPath, deltaSize int64)

type DAO

type DAO interface {
	PutSession(session *tree.IndexationSession) error
	ReadSession(sessionUuid string) (*tree.IndexationSession, SessionBatcher, error)
	DeleteSession(session *tree.IndexationSession) error
	CleanSessions() error
}

type MemoryBatcher

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

func (*MemoryBatcher) Flush

func (b *MemoryBatcher) Flush(ctx context.Context, dao index.DAO)

func (*MemoryBatcher) Notify

func (b *MemoryBatcher) Notify(topic string, msg interface{})

func (*MemoryBatcher) UpdateMPath

func (b *MemoryBatcher) UpdateMPath(path mtree.MPath, deltaSize int64)

type SessionBatcher

type SessionBatcher interface {
	Notify(topic string, msg interface{})
	UpdateMPath(path mtree.MPath, deltaSize int64)
	Flush(ctx context.Context, dao index.DAO)
}

func GetBenchSessionBatcher

func GetBenchSessionBatcher(b SessionBatcher) SessionBatcher

type SessionMemoryStore

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

func NewSessionMemoryStore

func NewSessionMemoryStore() *SessionMemoryStore

func (*SessionMemoryStore) CleanSessions

func (s *SessionMemoryStore) CleanSessions() error

func (*SessionMemoryStore) DeleteSession

func (s *SessionMemoryStore) DeleteSession(session *tree.IndexationSession) error

func (*SessionMemoryStore) PutSession

func (s *SessionMemoryStore) PutSession(session *tree.IndexationSession) error

func (*SessionMemoryStore) ReadSession

func (s *SessionMemoryStore) ReadSession(sessionUuid string) (*tree.IndexationSession, SessionBatcher, error)

type StoredEvent

type StoredEvent struct {
	Topic     string
	Msg       interface{}
	EventTime time.Time
}

Jump to

Keyboard shortcuts

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