enforcer

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Enforcer

type Enforcer interface {
	VerifyResponses(ctx context.Context, responses []distributor.DataResponse) error
	VerifyPartialResponses(ctx context.Context, responses []distributor.DataResponse)
	MaintainScore(ctx context.Context) error
	ChallengeStates(ctx context.Context) error
}

type SimpleEnforcer

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

func NewSimpleEnforcer

func NewSimpleEnforcer(databaseClient database.Client, cacheClient cache.Client, stakingContract *l2.Staking, httpClient httputil.Client) (*SimpleEnforcer, error)

func (*SimpleEnforcer) ChallengeStates

func (e *SimpleEnforcer) ChallengeStates(_ context.Context) error

func (*SimpleEnforcer) MaintainScore

func (e *SimpleEnforcer) MaintainScore(ctx context.Context) error

MaintainScore maintains the score of the nodes.

func (*SimpleEnforcer) VerifyPartialResponses added in v0.4.5

func (e *SimpleEnforcer) VerifyPartialResponses(ctx context.Context, responses []distributor.DataResponse)

VerifyPartialResponses performs a partial verification of the responses from the nodes.

func (*SimpleEnforcer) VerifyResponses added in v0.4.5

func (e *SimpleEnforcer) VerifyResponses(ctx context.Context, responses []distributor.DataResponse) error

VerifyResponses verifies the responses from the nodes.

Jump to

Keyboard shortcuts

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