tm

package
v1.3.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusService

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

func NewConsensusService

func NewConsensusService(params ConsensusServiceParams) *ConsensusService

func (*ConsensusService) ConsensusStatus

func (s *ConsensusService) ConsensusStatus(ctx context.Context, opts api.ConsensusStatusOptions) (*api.ConsensusStatus, error)

func (*ConsensusService) Type

func (s *ConsensusService) Type() api.ServiceType

type ConsensusServiceParams

type ConsensusServiceParams struct {
	Logger           log.Logger
	Local            NodeStatusClient
	Database         database.Viewer
	PartitionID      string
	PartitionType    protocol.PartitionType
	EventBus         *events.Bus
	NodeKeyHash      [32]byte
	ValidatorKeyHash [32]byte
}

type NodeStatusClient

type NodeStatusClient interface {
	Status(context.Context) (*coretypes.ResultStatus, error)
	NetInfo(context.Context) (*coretypes.ResultNetInfo, error)
}

type SubmitClient

type SubmitClient interface {
	BroadcastTxAsync(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)
	BroadcastTxSync(context.Context, types.Tx) (*coretypes.ResultBroadcastTx, error)
}

type Submitter

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

func NewSubmitter

func NewSubmitter(params SubmitterParams) *Submitter

func (*Submitter) Submit

func (s *Submitter) Submit(ctx context.Context, envelope *messaging.Envelope, opts api.SubmitOptions) ([]*api.Submission, error)

func (*Submitter) Type

func (s *Submitter) Type() api.ServiceType

type SubmitterParams

type SubmitterParams struct {
	Logger log.Logger
	Local  SubmitClient
}

type ValidateClient

type ValidateClient interface {
	CheckTx(context.Context, types.Tx) (*coretypes.ResultCheckTx, error)
}

type Validator

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

func NewValidator

func NewValidator(params ValidatorParams) *Validator

func (*Validator) Type

func (s *Validator) Type() api.ServiceType

func (*Validator) Validate

func (s *Validator) Validate(ctx context.Context, envelope *messaging.Envelope, opts api.ValidateOptions) ([]*api.Submission, error)

type ValidatorParams

type ValidatorParams struct {
	Logger log.Logger
	Local  ValidateClient
}

Jump to

Keyboard shortcuts

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