cordinator

package
v0.0.0-...-37eefcc Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

This package is used to access the data layer from APIs like REST, GRPC and CLI

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDetails = errors.New("invalid details")

	ErrRouteNotFound = errors.New("route not found")
)

Functions

This section is empty.

Types

type CordinatorProcess

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

func CreateCordinatorProcess

func CreateCordinatorProcess(
	selfNodeID string,
	nodeMgr *nodemanager.NodeManager,
	rStore *routestore.RouteStore,
	cp consensus.Consensus,
	dhtMgr dht.DHT,
	log *zap.Logger,
) *CordinatorProcess

func (*CordinatorProcess) Close

func (cp *CordinatorProcess) Close() error

Dummy method to satisfy the JobFetcher interface. Client will not usually call this method.

func (*CordinatorProcess) DeleteJob

func (cp *CordinatorProcess) DeleteJob(collection, jobID string) error

func (*CordinatorProcess) DeleteRoute

func (cp *CordinatorProcess) DeleteRoute(routeID string) error

func (*CordinatorProcess) FetchJobForBucket

func (cp *CordinatorProcess) FetchJobForBucket(minute int) ([]*jm.Job, error)

This should be used only for developement purpose

func (*CordinatorProcess) GetJob

func (cp *CordinatorProcess) GetJob(collection, jobID string) (*jm.Job, error)

func (*CordinatorProcess) GetRoute

func (cp *CordinatorProcess) GetRoute(routeID string) (*rm.Route, error)

func (*CordinatorProcess) ReplicateDeleteJob

func (cp *CordinatorProcess) ReplicateDeleteJob(collection, jobID string) error

func (*CordinatorProcess) ReplicateSetJob

func (cp *CordinatorProcess) ReplicateSetJob(collection string, job *jm.Job) error

ReplicateSetJob can be only called from the master

func (*CordinatorProcess) SetJob

func (cp *CordinatorProcess) SetJob(collection string, job *jm.Job) error

func (*CordinatorProcess) SetRoute

func (cp *CordinatorProcess) SetRoute(route *rm.Route) error

func (*CordinatorProcess) Type

Jump to

Keyboard shortcuts

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