controller

package
v0.0.0-...-5ce0579 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPingInterval        = 10
	DefaultMaxPingsOutstanding = 3
	DefaultMaxReconnects       = -1
)

Variables

View Source
var (
	ErrSubscriberNotFound = errors.New("subscriber manager: subscriber not found")
)

Functions

This section is empty.

Types

type Adapter

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

func NewAdapter

func NewAdapter(controller *Controller, component string, id string, name string) *Adapter

type AdapterManager

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

func NewAdapterManager

func NewAdapterManager(controller *Controller) *AdapterManager

func (*AdapterManager) GetAdapters

func (am *AdapterManager) GetAdapters() ([]*Adapter, error)

func (*AdapterManager) Initialize

func (am *AdapterManager) Initialize() error

func (*AdapterManager) Register

func (am *AdapterManager) Register(component string, adapterID string, name string, key *keyring.KeyInfo) error

func (*AdapterManager) Unregister

func (am *AdapterManager) Unregister(adapterID string) error

type Authentication

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

func NewAuthentication

func NewAuthentication() *Authentication

func (*Authentication) Authenticate

func (auth *Authentication) Authenticate(appID string, token []byte, allowAnonymous bool) *keyring.KeyInfo

func (*Authentication) Initialize

func (auth *Authentication) Initialize(controller *Controller) error

func (*Authentication) InitializeRPC

func (auth *Authentication) InitializeRPC() error

type CollectionManager

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

func NewCollectionManager

func NewCollectionManager(controller *Controller) *CollectionManager

func (*CollectionManager) GetCollection

func (cm *CollectionManager) GetCollection(collectionID string) (*types.Collection, error)

func (*CollectionManager) GetCollections

func (cm *CollectionManager) GetCollections() ([]*types.Collection, error)

func (*CollectionManager) Initialize

func (cm *CollectionManager) Initialize() error

func (*CollectionManager) Register

func (cm *CollectionManager) Register(collectionID string, collection *types.Collection) error

func (*CollectionManager) Unregister

func (cm *CollectionManager) Unregister(collectionID string) error

type Controller

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

func NewController

func NewController(a app.App) *Controller

func (*Controller) AssignPipeline

func (controller *Controller) AssignPipeline(synchronizerID string, pipelineID uint64) error

func (*Controller) DispatchPipeline

func (controller *Controller) DispatchPipeline(pipeline *Pipeline) bool

func (*Controller) GetClientCount

func (controller *Controller) GetClientCount() uint64

func (*Controller) GetPipelineCount

func (controller *Controller) GetPipelineCount() uint64

func (*Controller) GetPipelines

func (controller *Controller) GetPipelines(synchronizerID string) ([]uint64, error)

func (*Controller) Init

func (controller *Controller) Init() error

func (*Controller) Register

func (controller *Controller) Register(synchronizerID string) error

func (*Controller) ReleasePipeline

func (controller *Controller) ReleasePipeline(synchronizerID string, pipelineID uint64) error

func (*Controller) RevokePipeline

func (controller *Controller) RevokePipeline(synchronizerID string, pipelineID uint64) error

func (*Controller) Unregister

func (controller *Controller) Unregister(synchronizerID string) error

type Pipeline

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

func NewPipeline

func NewPipeline(id uint64) *Pipeline

func (*Pipeline) Assign

func (pipeline *Pipeline) Assign(synchronizerID string)

func (*Pipeline) Release

func (pipeline *Pipeline) Release()

type PipelineManager

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

func NewPipelineManager

func NewPipelineManager(controller *Controller) *PipelineManager

func (*PipelineManager) AssignPipeline

func (pm *PipelineManager) AssignPipeline(synchronizerID string, pipelineID uint64) error

func (*PipelineManager) DispatchPipeline

func (pm *PipelineManager) DispatchPipeline(pipeline *Pipeline) bool

func (*PipelineManager) GetCount

func (pm *PipelineManager) GetCount() int

func (*PipelineManager) GetPipeline

func (pm *PipelineManager) GetPipeline(pipelineID uint64) *Pipeline

func (*PipelineManager) HandleTask

func (pm *PipelineManager) HandleTask(task *Task) bool

func (*PipelineManager) Initialize

func (pm *PipelineManager) Initialize() error

func (*PipelineManager) ReleasePipeline

func (pm *PipelineManager) ReleasePipeline(synchronizerID string, pipelineID uint64) error

func (*PipelineManager) RevokePipeline

func (pm *PipelineManager) RevokePipeline(synchronizerID string, pipelineID uint64) error

type Service

type Service struct {
}

func NewService

func NewService() *Service

func (*Service) Start

func (service *Service) Start() error

type Subscriber

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

func NewSubscriber

func NewSubscriber(controller *Controller, subscriberType subscriber_manager_pb.SubscriberType, component string, id string, name string, properties map[string]interface{}) *Subscriber

func (*Subscriber) GetCollections

func (sc *Subscriber) GetCollections() []string

func (*Subscriber) SubscribeToCollections

func (sc *Subscriber) SubscribeToCollections(collections []string) ([]string, error)

func (*Subscriber) UnsubscribeFromCollections

func (sc *Subscriber) UnsubscribeFromCollections(collections []string) ([]string, error)

type SubscriberManager

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

func NewSubscriberManager

func NewSubscriberManager(controller *Controller) *SubscriberManager

func (*SubscriberManager) GetSubscriber

func (sm *SubscriberManager) GetSubscriber(subscriberID string) *Subscriber

func (*SubscriberManager) GetSubscribers

func (sm *SubscriberManager) GetSubscribers() ([]*Subscriber, error)

func (*SubscriberManager) HealthCheck

func (sm *SubscriberManager) HealthCheck(subscriberID string) error

func (*SubscriberManager) Initialize

func (sm *SubscriberManager) Initialize() error

func (*SubscriberManager) Register

func (sm *SubscriberManager) Register(subscriberType subscriber_manager_pb.SubscriberType, component string, appID string, token []byte, subscriberID string, name string, properties map[string]interface{}) error

func (*SubscriberManager) Unregister

func (sm *SubscriberManager) Unregister(subscriberID string) error

func (*SubscriberManager) UpdateSubscriberProps

func (sm *SubscriberManager) UpdateSubscriberProps(subscriberID string, props map[string]interface{}) error

type Synchronizer

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

func NewSynchronizer

func NewSynchronizer(sm *SynchronizerManager, id string) *Synchronizer

func (*Synchronizer) AssignPipeline

func (synchronizer *Synchronizer) AssignPipeline(pipelineID uint64) error

func (*Synchronizer) RegisterSubscriber

func (synchronizer *Synchronizer) RegisterSubscriber(subscriberID string) error

func (*Synchronizer) ReleasePipeline

func (synchronizer *Synchronizer) ReleasePipeline(pipelineID uint64) bool

func (*Synchronizer) RevokePipeline

func (synchronizer *Synchronizer) RevokePipeline(pipelineID uint64) error

func (*Synchronizer) UnregisterSubscriber

func (synchronizer *Synchronizer) UnregisterSubscriber(subscriberID string) error

type SynchronizerManager

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

func NewSynchronizerManager

func NewSynchronizerManager(controller *Controller) *SynchronizerManager

func (*SynchronizerManager) GetCount

func (sm *SynchronizerManager) GetCount() int

func (*SynchronizerManager) GetSynchronizer

func (sm *SynchronizerManager) GetSynchronizer(synchronizerID string) *Synchronizer

func (*SynchronizerManager) GetSynchronizers

func (sm *SynchronizerManager) GetSynchronizers() map[string]*Synchronizer

func (*SynchronizerManager) Initialize

func (sm *SynchronizerManager) Initialize() error

func (*SynchronizerManager) Register

func (sm *SynchronizerManager) Register(synchronizerID string) error

func (*SynchronizerManager) Request

func (sm *SynchronizerManager) Request(synchronizerID string, method string, data []byte) ([]byte, error)

func (*SynchronizerManager) Unregister

func (sm *SynchronizerManager) Unregister(synchronizerID string) error

func (*SynchronizerManager) UpdateKeyring

func (sm *SynchronizerManager) UpdateKeyring(key *keyring.KeyInfo) error

func (*SynchronizerManager) UpdateKeyringBySynchronizer

func (sm *SynchronizerManager) UpdateKeyringBySynchronizer(synchronizerID string, key *keyring.KeyInfo) error

type Task

type Task struct {
	Synchronizer *Synchronizer
	Pipeline     *Pipeline
}

func NewTask

func NewTask(syncronizer *Synchronizer, pipeline *Pipeline) *Task

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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