feeds

package
v0.10.10 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JobTypeFluxMonitor       = "fluxmonitor"
	JobTypeOffchainReporting = "offchainreporting"
)

We only support OCR and FM for the feeds manager

Variables

This section is empty.

Functions

func NewORM

func NewORM(db *gorm.DB) *orm

func NewService

func NewService(
	orm ORM,
	csaKeyStore keystore.CSAKeystoreInterface,
	ethKeyStore keystore.EthKeyStoreInterface,
	cfg Config,
) *service

NewService constructs a new feeds service

Types

type Config added in v0.10.10

type Config interface {
	ChainID() *big.Int
}

type FeedsManager

type FeedsManager struct {
	ID        int64
	Name      string
	URI       string
	PublicKey crypto.PublicKey
	JobTypes  pq.StringArray `gorm:"type:text[]"`
	Network   string
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (FeedsManager) TableName

func (FeedsManager) TableName() string

type JobProposal added in v0.10.9

type JobProposal struct {
	ID             int64
	Spec           string
	Status         JobProposalStatus
	JobID          uuid.NullUUID
	FeedsManagerID int64
	CreatedAt      time.Time
	UpdatedAt      time.Time
}

type JobProposalStatus added in v0.10.9

type JobProposalStatus string

JobProposalStatus are the status codes that define the stage of a proposal

const (
	JobProposalStatusPending  JobProposalStatus = "pending"
	JobProposalStatusApproved JobProposalStatus = "approved"
	JobProposalStatusRejected JobProposalStatus = "rejected"
)

type ORM

type ORM interface {
	CountJobProposals() (int64, error)
	CountManagers() (int64, error)
	CreateJobProposal(ctx context.Context, jp *JobProposal) (int64, error)
	CreateManager(ctx context.Context, ms *FeedsManager) (int64, error)
	GetJobProposal(ctx context.Context, id int64) (*JobProposal, error)
	GetManager(ctx context.Context, id int64) (*FeedsManager, error)
	ListJobProposals(ctx context.Context) ([]JobProposal, error)
	ListManagers(ctx context.Context) ([]FeedsManager, error)
}

type RPCHandlers added in v0.10.9

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

RPCHandlers define handlers for RPC method calls from the Feeds Manager

func NewRPCHandlers added in v0.10.9

func NewRPCHandlers(svc Service, feedsManagerID int64) *RPCHandlers

func (*RPCHandlers) ProposeJob added in v0.10.9

ProposeJob creates a new job proposal record for the feeds manager

type Service

type Service interface {
	Start() error
	Close() error

	CountManagers() (int64, error)
	CreateJobProposal(jp *JobProposal) (int64, error)
	GetManager(id int64) (*FeedsManager, error)
	ListManagers() ([]FeedsManager, error)
	RegisterManager(ms *FeedsManager) (int64, error)
	SyncNodeInfo(id int64) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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