tm

package
v1.1.0-1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 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 NodeService

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

func NewNodeService

func NewNodeService(params NodeServiceParams) *NodeService

func (*NodeService) NodeStatus

func (s *NodeService) NodeStatus(ctx context.Context, _ api.NodeStatusOptions) (*api.NodeStatus, error)

type NodeServiceParams

type NodeServiceParams 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 *protocol.Envelope, opts api.SubmitOptions) ([]*api.Submission, error)

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) Validate

func (s *Validator) Validate(ctx context.Context, envelope *protocol.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