engine

package
v21.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPrivateTxManagerNotinUse                          = errors.New("private transaction manager is not in use")
	ErrPrivateTxManagerNotReady                          = errors.New("private transaction manager is not ready")
	ErrPrivateTxManagerNotSupported                      = errors.New("private transaction manager does not support this operation")
	ErrPrivateTxManagerDoesNotSupportPrivacyEnhancements = errors.New("private transaction manager does not support privacy enhancements")
)
View Source
var DefaultConfig = Config{
	DialTimeout:           1,
	RequestTimeout:        5,
	ResponseHeaderTimeout: 5,
}

Functions

This section is empty.

Types

type Client

type Client struct {
	HttpClient *http.Client
	BaseURL    string
}

func (*Client) FullPath

func (c *Client) FullPath(path string) string

func (*Client) Get

func (c *Client) Get(path string) (*http.Response, error)

type Config

type Config struct {
	Socket  string `toml:"socket"`  // socket filename
	WorkDir string `toml:"workdir"` // path to socket file

	DialTimeout           uint // timeout for connecting to socket (seconds)
	RequestTimeout        uint // timeout for writing to socket (seconds)
	ResponseHeaderTimeout uint // timeout for reading from socket (seconds)

	// Deprecated
	SocketPath string `toml:"socketPath"`
}

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig sets up the configuration for the connection to a txn manager. It will accept a path to a socket file or a path to a config file, and returns the full configuration info for the socket file.

type ExtraMetadata

type ExtraMetadata struct {
	// Hashes of affected Contracts
	ACHashes common.EncryptedPayloadHashes
	// Root Hash of a Merkle Trie containing all affected contract account in state objects
	ACMerkleRoot common.Hash
	// Privacy flag for contract: standardPrivate, partyProtection, psv
	PrivacyFlag PrivacyFlagType
	// Contract participants that are managed by the corresponding Tessera.
	// Being used in Multi Tenancy
	ManagedParties []string
	// the sender of the transaction
	Sender string
}

Additional information for the private transaction that Private Transaction Manager carries

type FeatureSet

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

func NewFeatureSet

func NewFeatureSet(features ...PrivateTransactionManagerFeature) *FeatureSet

func (*FeatureSet) HasFeature

func (p *FeatureSet) HasFeature(feature PrivateTransactionManagerFeature) bool

type PrivacyFlagType

type PrivacyFlagType uint64
const (
	PrivacyFlagStandardPrivate PrivacyFlagType = iota                              // 0
	PrivacyFlagPartyProtection PrivacyFlagType = 1 << PrivacyFlagType(iota-1)      // 1
	PrivacyFlagStateValidation                 = iota | PrivacyFlagPartyProtection // 3 which includes PrivacyFlagPartyProtection
)

func (PrivacyFlagType) Has

func (f PrivacyFlagType) Has(other PrivacyFlagType) bool

func (PrivacyFlagType) HasAll

func (f PrivacyFlagType) HasAll(others ...PrivacyFlagType) bool

func (PrivacyFlagType) IsNotStandardPrivate

func (f PrivacyFlagType) IsNotStandardPrivate() bool

func (PrivacyFlagType) IsStandardPrivate

func (f PrivacyFlagType) IsStandardPrivate() bool

func (PrivacyFlagType) Validate

func (f PrivacyFlagType) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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