hub

package
v0.0.0-...-b178995 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType int
const (
	NewBlob EventType = iota
	ScanBlob
	GarbageCollection
	NewFiletreeNode
	FiletreeFSUpdate // TODO(tsileo): remove these events
	SyncRemoteBlob
	DeleteRemoteBlob
)

type Hub

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

func New

func New(logger log.Logger, root bool) *Hub

func (*Hub) FiletreeFSUpdateEvent

func (h *Hub) FiletreeFSUpdateEvent(ctx context.Context, blob *blob.Blob, data interface{}) error

func (*Hub) NewBlobEvent

func (h *Hub) NewBlobEvent(ctx context.Context, blob *blob.Blob, data interface{}) error

func (*Hub) NewDeleteRemoteBlobEvent

func (h *Hub) NewDeleteRemoteBlobEvent(ctx context.Context, blob *blob.Blob, data interface{}) error

func (*Hub) NewSyncRemoteBlobEvent

func (h *Hub) NewSyncRemoteBlobEvent(ctx context.Context, blob *blob.Blob, data interface{}) error

func (*Hub) ScanBlobEvent

func (h *Hub) ScanBlobEvent(ctx context.Context, blob *blob.Blob, data interface{}) error

func (*Hub) Subscribe

func (h *Hub) Subscribe(etype EventType, name string, callback func(context.Context, *blob.Blob, interface{}) error)

Jump to

Keyboard shortcuts

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