verifier

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrUpdatePolicies is returned when UpdatePolicies fails to parse a given policy.
	ErrUpdatePolicies = errors.New("failed to update policies")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Server           *connection.ServerConfig `mapstructure:"server" yaml:"server"`
	Monitoring       monitoring.Config        `mapstructure:"monitoring" yaml:"monitoring"`
	ParallelExecutor ExecutorConfig           `mapstructure:"parallel-executor" yaml:"parallel-executor"`
}

Config describes the signature verifier parameters.

type ExecutorConfig

type ExecutorConfig struct {
	// Parallelism How many parallel go routines will be launched
	Parallelism int `mapstructure:"parallelism" yaml:"parallelism"`
	// BatchSizeCutoff The minimum amount of responses we need to collect before emitting a response
	BatchSizeCutoff int `mapstructure:"batch-size-cutoff" yaml:"batch-size-cutoff"`
	// BatchTimeCutoff How often we should empty the non-empty buffer
	BatchTimeCutoff time.Duration `mapstructure:"batch-time-cutoff" yaml:"batch-time-cutoff"`
	// ChannelBufferSize The size of the buffer of the input channels (increase for high fluctuations of load)
	ChannelBufferSize int `mapstructure:"channel-buffer-size" yaml:"channel-buffer-size"`
}

ExecutorConfig describes the execution parameters.

type Server

type Server struct {
	protosigverifierservice.UnimplementedVerifierServer
	// contains filtered or unexported fields
}

Server implements verifier.Server.

func New

func New(config *Config) *Server

New instantiate a new VerifierServer.

func (*Server) RegisterService added in v0.1.5

func (s *Server) RegisterService(server *grpc.Server)

RegisterService registers for the verifier's GRPC services.

func (*Server) Run

func (s *Server) Run(ctx context.Context) error

Run the verifier background service.

func (*Server) StartStream

StartStream starts a verification stream.

func (*Server) WaitForReady

func (*Server) WaitForReady(context.Context) bool

WaitForReady wait for service to be ready to be exposed as gRPC service. If the context ended before the service is ready, returns false.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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