Documentation ¶
Overview ¶
Package insolar contains common definitions used by other modules.
Index ¶
- Constants
- Variables
- func Deserialize(data []byte, to interface{}) error
- func MustDeserialize(data []byte, to interface{})
- func MustSerialize(o interface{}) []byte
- func RootModuleDir() string
- func Serialize(o interface{}) ([]byte, error)
- type APIRunner
- type Arguments
- type AuthorizationCertificate
- type AvailabilityChecker
- type CallMode
- type CallerFieldMode
- type Certificate
- type CertificateGetter
- type CertificateManager
- type ContractConstructor
- type ContractConstructors
- type ContractMethod
- type ContractMethods
- type ContractRequester
- type ContractWrapper
- type CryptographyService
- type DiscoveryNode
- type DiscoveryNodeRegister
- type DynamicRole
- type EmbeddedLogger
- type Entropy
- func (entropy Entropy) Compare(other Entropy) int
- func (entropy Entropy) Equal(other Entropy) bool
- func (entropy Entropy) Marshal() ([]byte, error)
- func (entropy Entropy) MarshalTo(data []byte) (int, error)
- func (entropy Entropy) Size() int
- func (entropy *Entropy) Unmarshal(data []byte) error
- func (entropy *Entropy) UnmarshalJSON(data []byte) error
- type GenesisContractState
- type GenesisContractsConfig
- type GenesisHeavyConfig
- type GlobalLogAdapter
- type GlobalLogAdapterFactory
- type GlobuleID
- type Hasher
- type ID
- type JetID
- func (id *JetID) DebugString() string
- func (id JetID) Depth() uint8
- func (id *JetID) Equal(other JetID) bool
- func (id JetID) IsEmpty() bool
- func (id *JetID) IsValid() bool
- func (id JetID) Marshal() ([]byte, error)
- func (id *JetID) MarshalTo(data []byte) (n int, err error)
- func (id JetID) Prefix() []byte
- func (id *JetID) Size() int
- func (id *JetID) Unmarshal(data []byte) error
- type JetIDCollection
- type KeyProcessor
- type KeyStore
- type Leaver
- type LogFormat
- type LogLevel
- type LogLevelGetter
- type LogLevelWriter
- type LogMetricsMode
- type LogMetricsRecorder
- type LogObjectMarshaller
- type LogObjectWriter
- type LogOutput
- type Logger
- type LoggerBuilder
- type LoggerMock
- func (mmCopy *LoggerMock) Copy() (l1 LoggerBuilder)
- func (mmCopy *LoggerMock) CopyAfterCounter() uint64
- func (mmCopy *LoggerMock) CopyBeforeCounter() uint64
- func (mmDebug *LoggerMock) Debug(p1 ...interface{})
- func (mmDebug *LoggerMock) DebugAfterCounter() uint64
- func (mmDebug *LoggerMock) DebugBeforeCounter() uint64
- func (mmDebugf *LoggerMock) Debugf(s1 string, p1 ...interface{})
- func (mmDebugf *LoggerMock) DebugfAfterCounter() uint64
- func (mmDebugf *LoggerMock) DebugfBeforeCounter() uint64
- func (mmEmbeddable *LoggerMock) Embeddable() (e1 EmbeddedLogger)
- func (mmEmbeddable *LoggerMock) EmbeddableAfterCounter() uint64
- func (mmEmbeddable *LoggerMock) EmbeddableBeforeCounter() uint64
- func (mmError *LoggerMock) Error(p1 ...interface{})
- func (mmError *LoggerMock) ErrorAfterCounter() uint64
- func (mmError *LoggerMock) ErrorBeforeCounter() uint64
- func (mmErrorf *LoggerMock) Errorf(s1 string, p1 ...interface{})
- func (mmErrorf *LoggerMock) ErrorfAfterCounter() uint64
- func (mmErrorf *LoggerMock) ErrorfBeforeCounter() uint64
- func (mmEvent *LoggerMock) Event(level LogLevel, args ...interface{})
- func (mmEvent *LoggerMock) EventAfterCounter() uint64
- func (mmEvent *LoggerMock) EventBeforeCounter() uint64
- func (mmEventf *LoggerMock) Eventf(level LogLevel, fmt string, args ...interface{})
- func (mmEventf *LoggerMock) EventfAfterCounter() uint64
- func (mmEventf *LoggerMock) EventfBeforeCounter() uint64
- func (mmFatal *LoggerMock) Fatal(p1 ...interface{})
- func (mmFatal *LoggerMock) FatalAfterCounter() uint64
- func (mmFatal *LoggerMock) FatalBeforeCounter() uint64
- func (mmFatalf *LoggerMock) Fatalf(s1 string, p1 ...interface{})
- func (mmFatalf *LoggerMock) FatalfAfterCounter() uint64
- func (mmFatalf *LoggerMock) FatalfBeforeCounter() uint64
- func (mmInfo *LoggerMock) Info(p1 ...interface{})
- func (mmInfo *LoggerMock) InfoAfterCounter() uint64
- func (mmInfo *LoggerMock) InfoBeforeCounter() uint64
- func (mmInfof *LoggerMock) Infof(s1 string, p1 ...interface{})
- func (mmInfof *LoggerMock) InfofAfterCounter() uint64
- func (mmInfof *LoggerMock) InfofBeforeCounter() uint64
- func (mmIs *LoggerMock) Is(level LogLevel) (b1 bool)
- func (mmIs *LoggerMock) IsAfterCounter() uint64
- func (mmIs *LoggerMock) IsBeforeCounter() uint64
- func (mmLevel *LoggerMock) Level(lvl LogLevel) (l1 Logger)
- func (mmLevel *LoggerMock) LevelAfterCounter() uint64
- func (mmLevel *LoggerMock) LevelBeforeCounter() uint64
- func (m *LoggerMock) MinimockCopyDone() bool
- func (m *LoggerMock) MinimockCopyInspect()
- func (m *LoggerMock) MinimockDebugDone() bool
- func (m *LoggerMock) MinimockDebugInspect()
- func (m *LoggerMock) MinimockDebugfDone() bool
- func (m *LoggerMock) MinimockDebugfInspect()
- func (m *LoggerMock) MinimockEmbeddableDone() bool
- func (m *LoggerMock) MinimockEmbeddableInspect()
- func (m *LoggerMock) MinimockErrorDone() bool
- func (m *LoggerMock) MinimockErrorInspect()
- func (m *LoggerMock) MinimockErrorfDone() bool
- func (m *LoggerMock) MinimockErrorfInspect()
- func (m *LoggerMock) MinimockEventDone() bool
- func (m *LoggerMock) MinimockEventInspect()
- func (m *LoggerMock) MinimockEventfDone() bool
- func (m *LoggerMock) MinimockEventfInspect()
- func (m *LoggerMock) MinimockFatalDone() bool
- func (m *LoggerMock) MinimockFatalInspect()
- func (m *LoggerMock) MinimockFatalfDone() bool
- func (m *LoggerMock) MinimockFatalfInspect()
- func (m *LoggerMock) MinimockFinish()
- func (m *LoggerMock) MinimockInfoDone() bool
- func (m *LoggerMock) MinimockInfoInspect()
- func (m *LoggerMock) MinimockInfofDone() bool
- func (m *LoggerMock) MinimockInfofInspect()
- func (m *LoggerMock) MinimockIsDone() bool
- func (m *LoggerMock) MinimockIsInspect()
- func (m *LoggerMock) MinimockLevelDone() bool
- func (m *LoggerMock) MinimockLevelInspect()
- func (m *LoggerMock) MinimockPanicDone() bool
- func (m *LoggerMock) MinimockPanicInspect()
- func (m *LoggerMock) MinimockPanicfDone() bool
- func (m *LoggerMock) MinimockPanicfInspect()
- func (m *LoggerMock) MinimockWait(timeout mm_time.Duration)
- func (m *LoggerMock) MinimockWarnDone() bool
- func (m *LoggerMock) MinimockWarnInspect()
- func (m *LoggerMock) MinimockWarnfDone() bool
- func (m *LoggerMock) MinimockWarnfInspect()
- func (m *LoggerMock) MinimockWithFieldDone() bool
- func (m *LoggerMock) MinimockWithFieldInspect()
- func (m *LoggerMock) MinimockWithFieldsDone() bool
- func (m *LoggerMock) MinimockWithFieldsInspect()
- func (mmPanic *LoggerMock) Panic(p1 ...interface{})
- func (mmPanic *LoggerMock) PanicAfterCounter() uint64
- func (mmPanic *LoggerMock) PanicBeforeCounter() uint64
- func (mmPanicf *LoggerMock) Panicf(s1 string, p1 ...interface{})
- func (mmPanicf *LoggerMock) PanicfAfterCounter() uint64
- func (mmPanicf *LoggerMock) PanicfBeforeCounter() uint64
- func (mmWarn *LoggerMock) Warn(p1 ...interface{})
- func (mmWarn *LoggerMock) WarnAfterCounter() uint64
- func (mmWarn *LoggerMock) WarnBeforeCounter() uint64
- func (mmWarnf *LoggerMock) Warnf(s1 string, p1 ...interface{})
- func (mmWarnf *LoggerMock) WarnfAfterCounter() uint64
- func (mmWarnf *LoggerMock) WarnfBeforeCounter() uint64
- func (mmWithField *LoggerMock) WithField(s1 string, p1 interface{}) (l1 Logger)
- func (mmWithField *LoggerMock) WithFieldAfterCounter() uint64
- func (mmWithField *LoggerMock) WithFieldBeforeCounter() uint64
- func (mmWithFields *LoggerMock) WithFields(m1 map[string]interface{}) (l1 Logger)
- func (mmWithFields *LoggerMock) WithFieldsAfterCounter() uint64
- func (mmWithFields *LoggerMock) WithFieldsBeforeCounter() uint64
- type LoggerMockCopyExpectation
- type LoggerMockCopyResults
- type LoggerMockDebugExpectation
- type LoggerMockDebugParams
- type LoggerMockDebugfExpectation
- type LoggerMockDebugfParams
- type LoggerMockEmbeddableExpectation
- type LoggerMockEmbeddableResults
- type LoggerMockErrorExpectation
- type LoggerMockErrorParams
- type LoggerMockErrorfExpectation
- type LoggerMockErrorfParams
- type LoggerMockEventExpectation
- type LoggerMockEventParams
- type LoggerMockEventfExpectation
- type LoggerMockEventfParams
- type LoggerMockFatalExpectation
- type LoggerMockFatalParams
- type LoggerMockFatalfExpectation
- type LoggerMockFatalfParams
- type LoggerMockInfoExpectation
- type LoggerMockInfoParams
- type LoggerMockInfofExpectation
- type LoggerMockInfofParams
- type LoggerMockIsExpectation
- type LoggerMockIsParams
- type LoggerMockIsResults
- type LoggerMockLevelExpectation
- type LoggerMockLevelParams
- type LoggerMockLevelResults
- type LoggerMockPanicExpectation
- type LoggerMockPanicParams
- type LoggerMockPanicfExpectation
- type LoggerMockPanicfParams
- type LoggerMockWarnExpectation
- type LoggerMockWarnParams
- type LoggerMockWarnfExpectation
- type LoggerMockWarnfParams
- type LoggerMockWithFieldExpectation
- type LoggerMockWithFieldParams
- type LoggerMockWithFieldResults
- type LoggerMockWithFieldsExpectation
- type LoggerMockWithFieldsParams
- type LoggerMockWithFieldsResults
- type LoggerOutput
- type LoggerOutputGetter
- type LogicCallContext
- type LogicRunner
- type MachineLogicExecutor
- type MachineType
- type NetworkNode
- type NetworkState
- type NetworkStatus
- type Node
- func (*Node) Descriptor() ([]byte, []int)
- func (this *Node) Equal(that interface{}) bool
- func (this *Node) GoString() string
- func (m *Node) Marshal() (dAtA []byte, err error)
- func (m *Node) MarshalTo(dAtA []byte) (int, error)
- func (*Node) ProtoMessage()
- func (m *Node) Reset()
- func (m *Node) Size() (n int)
- func (this *Node) String() string
- func (m *Node) Unmarshal(dAtA []byte) error
- func (m *Node) XXX_DiscardUnknown()
- func (m *Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Node) XXX_Merge(src proto.Message)
- func (m *Node) XXX_Size() int
- func (m *Node) XXX_Unmarshal(b []byte) error
- type NodeList
- func (*NodeList) Descriptor() ([]byte, []int)
- func (this *NodeList) Equal(that interface{}) bool
- func (this *NodeList) GoString() string
- func (m *NodeList) Marshal() (dAtA []byte, err error)
- func (m *NodeList) MarshalTo(dAtA []byte) (int, error)
- func (*NodeList) ProtoMessage()
- func (m *NodeList) Reset()
- func (m *NodeList) Size() (n int)
- func (this *NodeList) String() string
- func (m *NodeList) Unmarshal(dAtA []byte) error
- func (m *NodeList) XXX_DiscardUnknown()
- func (m *NodeList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *NodeList) XXX_Merge(src proto.Message)
- func (m *NodeList) XXX_Size() int
- func (m *NodeList) XXX_Unmarshal(b []byte) error
- type NodeMeta
- type NodeState
- type Payload
- type PendingState
- type PlatformCryptographyScheme
- type Power
- type Pulse
- type PulseDistributor
- type PulseManager
- type PulseNumber
- type PulseRange
- type PulseSenderConfirmation
- type Reference
- func NewEmptyReference() *Reference
- func NewGlobalReference(local ID, base ID) *Reference
- func NewObjectReferenceFromBase58(input string) (*Reference, error)
- func NewRecordReference(local ID) *Reference
- func NewReference(id ID) *Reference
- func NewReferenceFromBase58(input string) (*Reference, error)
- func NewReferenceFromBytes(byteReference []byte) *Reference
- type Reply
- type ReplyType
- type ShortNodeID
- type Signature
- type Signer
- type StaticRole
- type StatusReply
- type Verifier
Constants ¶
const ( // GenesisNameRootDomain is the name of root domain contract for genesis record. GenesisNameRootDomain = "rootdomain" // GenesisNameNodeDomain is the name of node domain contract for genesis record. GenesisNameNodeDomain = "nodedomain" // GenesisNameNodeRecord is the name of node contract for genesis record. GenesisNameNodeRecord = "noderecord" // GenesisNameMember is the name of member contract for genesis record. GenesisNameMember = "member" // GenesisNameWallet is the name of wallet contract for genesis record. GenesisNameWallet = "wallet" // GenesisNameAccount is the name of wallet contract for genesis record. GenesisNameAccount = "account" // GenesisNameDeposit is the name of deposit contract for genesis record. GenesisNameDeposit = "deposit" // GenesisNameCostCenter is the name of cost center contract for genesis record. GenesisNameCostCenter = "costcenter" // GenesisNameMigrationAdmin is the name of migration admin contract for genesis record. GenesisNameMigrationAdmin = "migrationadmin" // GenesisNameMigrationAdmin is the name of migration daemon contract,which is associated with MigrationDaemonMember for genesis record. GenesisNameMigrationDaemon = "migrationdaemon" // GenesisNamePKShard is the name of public key shard contract for genesis record. GenesisNamePKShard = "pkshard" // GenesisNameMigrationShard is the name of migration address shard contract for genesis record. GenesisNameMigrationShard = "migrationshard" GenesisNameRootMember = "root" + GenesisNameMember GenesisNameRootWallet = "root" + GenesisNameWallet GenesisNameRootAccount = "root" + GenesisNameAccount GenesisNameMigrationAdminMember = "migration" + GenesisNameMember GenesisNameMigrationAdminWallet = "migration" + GenesisNameWallet GenesisNameMigrationAdminAccount = "migration" + GenesisNameAccount GenesisNameMigrationAdminDeposit = "migration" + GenesisNameDeposit GenesisNameFeeMember = "fee" + GenesisNameMember GenesisNameFeeWallet = "fee" + GenesisNameWallet GenesisNameFeeAccount = "fee" + GenesisNameAccount GenesisAmountMigrationDaemonMembers = 10 GenesisAmountActiveMigrationDaemonMembers = 2 GenesisAmountFundsMembers = 2 GenesisAmountEnterpriseMembers = 3 GenesisAmountNetworkIncentivesMembers = 30 GenesisAmountApplicationIncentivesMembers = 30 GenesisAmountFoundationMembers = 30 DefaultDistributionAmount = "10000000000000000000" )
const ( // JetSize is a Jet's size (depth+prefix). JetSize = RecordIDSize - PulseNumberSize // JetPrefixSize is a Jet's prefix size. JetPrefixSize = JetSize - 1 // JetMaximumDepth is a Jet's maximum depth (maximum offset in bits). JetMaximumDepth = JetPrefixSize*8 - 1 // JetDepthPosition is an position where depth of jet id is located JetDepthPosition = 0 // JetPrefixOffset is an offset where prefix starts in jet id. JetPrefixOffset = JetDepthPosition + 1 )
const ( StaticRoleUnknown = StaticRole(iota) StaticRoleVirtual StaticRoleHeavyMaterial StaticRoleLightMaterial )
const ( // PulseNumberSize is alias that was left for compatibility PulseNumberSize = pulse.NumberSize // EntropySize declares the number of bytes in the pulse entropy EntropySize = 64 // OriginIDSize declares the number of bytes in the origin id OriginIDSize = 16 )
const ( InvalidPulseEpoch int = 0 EphemeralPulseEpoch = InvalidPulseEpoch + 1 )
const ( // RecordHashSize is a record hash size. We use 224-bit SHA-3 hash (28 bytes). RecordHashSize = 28 // RecordIDSize is relative record address. RecordIDSize = PulseNumberSize + RecordHashSize // RecordHashOffset is a offset where hash bytes starts in ID. RecordHashOffset = PulseNumberSize // RecordRefSize is absolute records address (including domain ID). RecordRefSize = RecordIDSize * 2 // RecordRefIDSeparator is character that separates ID from DomainID in serialized Reference. RecordRefIDSeparator = "." )
const ( // DynamicRoleUndefined is used for special cases. DynamicRoleUndefined = DynamicRole(iota) // DynamicRoleVirtualExecutor is responsible for current pulse CPU operations. DynamicRoleVirtualExecutor // DynamicRoleVirtualValidator is responsible for previous pulse CPU operations. DynamicRoleVirtualValidator // DynamicRoleLightExecutor is responsible for current pulse Disk operations. DynamicRoleLightExecutor // DynamicRoleLightValidator is responsible for previous pulse Disk operations. DynamicRoleLightValidator // DynamicRoleHeavyExecutor is responsible for permanent Disk operations. DynamicRoleHeavyExecutor )
const DefaultLogFormat = TextFormat
const DefaultLogOutput = StdErrOutput
const DefaultOutputParallelLimit = 5
const LogLevelCount = int(maxLogLevel)
const (
ShortNodeIDSize = 4
)
Variables ¶
var ( // ErrUnknown is returned when error type cannot be defined. ErrUnknown = errors.New("unknown error") // ErrDeactivated is returned when requested object is deactivated. ErrDeactivated = errors.New("object is deactivated") // ErrStateNotAvailable is returned when requested object is deactivated. ErrStateNotAvailable = errors.New("object state is not available") // ErrHotDataTimeout is returned when no hot data received for a specific jet ErrHotDataTimeout = errors.New("requests were abandoned due to hot-data timeout") // ErrNoPendingRequest is returned when there are no pending requests on current LME ErrNoPendingRequest = errors.New("no pending requests are available") // ErrNotFound is returned when something not found ErrNotFound = errors.New("not found") )
var ( ErrInvalidLengthNode = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowNode = fmt.Errorf("proto: integer overflow") )
var AllStaticRoles = []StaticRole{ StaticRoleVirtual, StaticRoleLightMaterial, StaticRoleHeavyMaterial, }
AllStaticRoles is an array of all possible StaticRoles.
var EphemeralPulse = &Pulse{ PulseNumber: pulse.MinTimePulse, Entropy: [EntropySize]byte{}, EpochPulseNumber: EphemeralPulseEpoch, PulseTimestamp: pulse.UnixTimeOfMinTimePulse, }
EphemeralPulse is used for discovery network bootstrap
var GenesisNameApplicationIncentivesAccounts = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
var GenesisNameApplicationIncentivesDeposits = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
var GenesisNameApplicationIncentivesMembers = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameApplicationIncentivesWallets = func() (result [GenesisAmountApplicationIncentivesMembers]string) { for i := 0; i < GenesisAmountApplicationIncentivesMembers; i++ { result[i] = "application_incentives_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
var GenesisNameEnterpriseAccounts = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
var GenesisNameEnterpriseDeposits = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
var GenesisNameEnterpriseMembers = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameEnterpriseWallets = func() (result [GenesisAmountEnterpriseMembers]string) { for i := 0; i < GenesisAmountEnterpriseMembers; i++ { result[i] = "enterprise_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
var GenesisNameFoundationAccounts = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
var GenesisNameFoundationDeposits = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
var GenesisNameFoundationMembers = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameFoundationWallets = func() (result [GenesisAmountFoundationMembers]string) { for i := 0; i < GenesisAmountFoundationMembers; i++ { result[i] = "foundation_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
var GenesisNameFundsAccounts = func() (result [GenesisAmountFundsMembers]string) { for i := 0; i < GenesisAmountFundsMembers; i++ { result[i] = "funds_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
var GenesisNameFundsDeposits = func() (result [GenesisAmountFundsMembers]string) { for i := 0; i < GenesisAmountFundsMembers; i++ { result[i] = "funds_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
var GenesisNameFundsMembers = func() (result [GenesisAmountFundsMembers]string) { for i := 0; i < GenesisAmountFundsMembers; i++ { result[i] = "funds_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameFundsWallets = func() (result [GenesisAmountFundsMembers]string) { for i := 0; i < GenesisAmountFundsMembers; i++ { result[i] = "funds_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
var GenesisNameMigrationDaemonMembers = func() (result [GenesisAmountMigrationDaemonMembers]string) { for i := 0; i < GenesisAmountMigrationDaemonMembers; i++ { result[i] = "migration_daemon_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameMigrationDaemons = func() (result [GenesisAmountMigrationDaemonMembers]string) { for i := 0; i < GenesisAmountMigrationDaemonMembers; i++ { result[i] = GenesisNameMigrationDaemon + "_" + strconv.Itoa(i) } return }()
var GenesisNameNetworkIncentivesAccounts = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameAccount } return }()
var GenesisNameNetworkIncentivesDeposits = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameDeposit } return }()
var GenesisNameNetworkIncentivesMembers = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameMember } return }()
var GenesisNameNetworkIncentivesWallets = func() (result [GenesisAmountNetworkIncentivesMembers]string) { for i := 0; i < GenesisAmountNetworkIncentivesMembers; i++ { result[i] = "network_incentives_" + strconv.Itoa(i) + "_" + GenesisNameWallet } return }()
var GenesisPulse = &Pulse{ PulseNumber: pulse.MinTimePulse, Entropy: [EntropySize]byte{}, EpochPulseNumber: pulse.MinTimePulse, PulseTimestamp: pulse.UnixTimeOfMinTimePulse, }
GenesisPulse is a first pulse for the system because first 2 bits of pulse number and first 65536 pulses a are used by system needs and pulse numbers are related to the seconds of Unix time for calculation pulse numbers we use the formula = unix.Now() - firstPulseDate + 65536
var GenesisRecord genesisBinary = []byte{0xAC}
GenesisRecord is initial chain record.
var RootModule = "github.com/insolar/insolar"
RootModule holds root module name.
var ZeroJetID = *NewJetID(0, nil)
ZeroJetID is value of an empty Jet ID
Functions ¶
func Deserialize ¶
Deserialize deserializes data to specific interface
func MustDeserialize ¶
func MustDeserialize(data []byte, to interface{})
MustDeserialize deserializes data to specific interface, panics on error.
func MustSerialize ¶
func MustSerialize(o interface{}) []byte
MustSerialize serializes interface, panics on error.
func RootModuleDir ¶ added in v0.9.3
func RootModuleDir() string
RootModuleDir returns abs path to root module for any package where it's called.
Types ¶
type Arguments ¶
type Arguments []byte
Arguments is a dedicated type for arguments, that represented as binary cbored blob
func (*Arguments) MarshalJSON ¶
MarshalJSON uncbor Arguments slice recursively
type AuthorizationCertificate ¶
type AuthorizationCertificate interface { NodeMeta GetRole() StaticRole SerializeNodePart() []byte GetDiscoverySigns() map[Reference][]byte }
AuthorizationCertificate interface provides methods to manage info about node from it certificate
type AvailabilityChecker ¶ added in v0.9.8
AvailabilityChecker component checks if insolar network can't process any new requests
type CallerFieldMode ¶ added in v0.9.8
type CallerFieldMode uint8
const ( NoCallerField CallerFieldMode = iota CallerField CallerFieldWithFuncName )
type Certificate ¶
type Certificate interface { AuthorizationCertificate GetRootDomainReference() *Reference GetDiscoveryNodes() []DiscoveryNode GetMajorityRule() int GetMinRoles() (virtual uint, heavyMaterial uint, lightMaterial uint) }
Certificate interface provides methods to manage keys
type CertificateGetter ¶
type CertificateGetter interface { // GetState returns our current thoughs about whole network GetCert(context.Context, *Reference) (Certificate, error) }
type CertificateManager ¶
type CertificateManager interface {
GetCertificate() Certificate
}
CertificateManager interface provides methods to manage nodes certificate
type ContractConstructor ¶
ContractConstructor is a typedef of typical contract constructor
type ContractConstructors ¶
type ContractConstructors map[string]ContractConstructor
ContractConstructors maps name to contract constructor
type ContractMethod ¶
ContractConstructor is a typedef for wrapper contract header
type ContractMethods ¶
type ContractMethods map[string]ContractMethod
ContractMethods maps name to contract method
type ContractRequester ¶
type ContractRequester interface { SendRequest(ctx context.Context, msg Payload) (Reply, *Reference, error) Call(ctx context.Context, ref *Reference, method string, argsIn []interface{}, pulse PulseNumber) (Reply, *Reference, error) }
ContractRequester is the global contract requester handler. Other system parts communicate with contract requester through it.
type ContractWrapper ¶
type ContractWrapper struct { GetCode ContractMethod GetPrototype ContractMethod Methods ContractMethods Constructors ContractConstructors }
ContractWrapper stores all needed about contract wrapper (it's methods/constructors)
type CryptographyService ¶
type DiscoveryNode ¶
type DiscoveryNode interface { NodeMeta GetRole() StaticRole GetHost() string }
type DiscoveryNodeRegister ¶
DiscoveryNodeRegister carries data required for registering discovery node via genesis.
type DynamicRole ¶
type DynamicRole int
DynamicRole is number representing a node role.
func (DynamicRole) IsVirtualRole ¶
func (r DynamicRole) IsVirtualRole() bool
IsVirtualRole checks if node role is virtual (validator or executor).
func (DynamicRole) String ¶
func (i DynamicRole) String() string
type EmbeddedLogger ¶ added in v0.9.8
type EmbeddedLogger interface { // Event logs a message with the given level. DO NOT USE directly. EmbeddedEvent(level LogLevel, args ...interface{}) // Eventf formats and logs a message with the given level. DO NOT USE directly. EmbeddedEventf(level LogLevel, fmt string, args ...interface{}) // Does flushing of an underlying buffer. Implementation and factual output may vary. EmbeddedFlush(msg string) }
This interface provides methods with -1 call levels. DO NOT USE directly, otherwise WithCaller() functionality will be broken.
type Entropy ¶
type Entropy [EntropySize]byte
Entropy is 64 random bytes used in every pseudo-random calculations.
func (*Entropy) UnmarshalJSON ¶
type GenesisContractState ¶
GenesisContractState carries data required for contract object creation via genesis.
type GenesisContractsConfig ¶
type GenesisContractsConfig struct { RootBalance string Fee string MDBalance string RootPublicKey string FeePublicKey string MigrationAdminPublicKey string MigrationDaemonPublicKeys []string VestingPeriodInPulses int64 LockupPeriodInPulses int64 VestingStepInPulses int64 MigrationAddresses [][]string FundsPublicKeys []string EnterprisePublicKeys []string NetworkIncentivesPublicKeys []string ApplicationIncentivesPublicKeys []string FoundationPublicKeys []string PKShardCount int MAShardCount int }
GenesisContractsConfig carries data required for contract object initialization via genesis.
type GenesisHeavyConfig ¶
type GenesisHeavyConfig struct { // DiscoveryNodes is the list with discovery node info. DiscoveryNodes []DiscoveryNodeRegister ContractsConfig GenesisContractsConfig // Skip is flag for skipping genesis on heavy node. Useful for some test cases. Skip bool }
GenesisHeavyConfig carries data required for initial genesis on heavy node.
type GlobalLogAdapter ¶ added in v0.9.8
type GlobalLogAdapterFactory ¶ added in v0.9.8
type GlobalLogAdapterFactory interface {
CreateGlobalLogAdapter() GlobalLogAdapter
}
type ID ¶
ID is a unified record ID
func NewEmptyID ¶
func NewEmptyID() *ID
func NewIDFromBase58 ¶
NewIDFromBase58 deserializes ID from base58 encoded string
type JetID ¶
type JetID ID
JetID should be used, when id is a jetID
func (*JetID) DebugString ¶
DebugString prints JetID in human readable form.
type JetIDCollection ¶
type JetIDCollection []JetID
func (JetIDCollection) DebugString ¶
func (ids JetIDCollection) DebugString() string
type KeyProcessor ¶
type KeyProcessor interface { GeneratePrivateKey() (crypto.PrivateKey, error) ExtractPublicKey(crypto.PrivateKey) crypto.PublicKey ExportPublicKeyPEM(crypto.PublicKey) ([]byte, error) ImportPublicKeyPEM([]byte) (crypto.PublicKey, error) ExportPrivateKeyPEM(crypto.PrivateKey) ([]byte, error) ImportPrivateKeyPEM([]byte) (crypto.PrivateKey, error) ExportPublicKeyBinary(crypto.PublicKey) ([]byte, error) ImportPublicKeyBinary([]byte) (crypto.PublicKey, error) }
type Leaver ¶
type Leaver interface { // Leave notify other nodes that this node want to leave and doesn't want to receive new tasks Leave(ctx context.Context, ETA PulseNumber) }
type LogLevel ¶
type LogLevel uint8
full copy of zerolog functions to work with logging level needed to support logging level in packet
NoLevel means it should be ignored
func ParseLevel ¶
type LogLevelGetter ¶ added in v0.9.8
type LogLevelGetter interface {
GetLogLevel() LogLevel
}
type LogLevelWriter ¶ added in v0.9.8
type LogMetricsMode ¶ added in v0.9.8
type LogMetricsMode uint8
const ( // Logger will report every event to metrics LogMetricsEventCount LogMetricsMode = 1 << iota // Logger will report to metrics a write duration (time since an event was created till it was directed to the output) LogMetricsWriteDelayReport // Logger will add a write duration field into to the output LogMetricsWriteDelayField // No effect on logger. Indicates that WithMetrics should replace the mode, instead of adding it. LogMetricsResetMode )
const NoLogMetrics LogMetricsMode = 0
type LogMetricsRecorder ¶ added in v0.9.8
type LogObjectMarshaller ¶ added in v0.9.8
type LogObjectMarshaller interface {
MarshalLogObject(LogObjectWriter) string
}
type LogObjectWriter ¶ added in v0.9.8
type Logger ¶
type Logger interface { // Debug logs a message at level Debug. Debug(...interface{}) // Debugf formatted logs a message at level Debug. Debugf(string, ...interface{}) // Info logs a message at level Info. Info(...interface{}) // Infof formatted logs a message at level Info. Infof(string, ...interface{}) // Warn logs a message at level Warn. Warn(...interface{}) // Warnf logs a message at level Warn. Warnf(string, ...interface{}) // Error logs a message at level Error. Error(...interface{}) // Errorf logs a message at level Error. Errorf(string, ...interface{}) // Fatal logs a message at level Fatal and than call os.exit(). Fatal(...interface{}) // Fatalf formatted logs a message at level Fatal and than call os.exit(). Fatalf(string, ...interface{}) // Panic logs a message at level Panic and than call panic(). Panic(...interface{}) // Panicf formatted logs a message at level Panic and than call panic(). Panicf(string, ...interface{}) // Event logs a message with the given level. Event(level LogLevel, args ...interface{}) // Eventf formats and logs a message with the given level. Eventf(level LogLevel, fmt string, args ...interface{}) // Is() returns true when a message of the given level will get to output. Considers the global log filter. Is(level LogLevel) bool // WithFields return copy of Logger with the given fields added. WithFields(map[string]interface{}) Logger // WithField return copy of Logger with the given field added. WithField(string, interface{}) Logger // Provides a builder based on configuration of this logger. Copy() LoggerBuilder // Provides a copy of this logger with a filter set to lvl. Level(lvl LogLevel) Logger // DO NOT USE directly. Provides access to an embeddable methods of this logger. Embeddable() EmbeddedLogger }
Logger is the interface for loggers used in the Insolar components.
type LoggerBuilder ¶ added in v0.9.8
type LoggerBuilder interface { // Returns the current output GetOutput() io.Writer // Returns the current log level GetLogLevel() LogLevel // Sets the output destination for the logger. WithOutput(w io.Writer) LoggerBuilder // WithFormat sets logger output format. WithFormat(format LogFormat) LoggerBuilder // Set buffer size and applicability of the buffer. Will be IGNORED when a reused output is already buffered. WithBuffer(bufferSize int, bufferForAll bool) LoggerBuilder // WithLevel sets log level. Cancels WithDynamicLevel() WithLevel(level LogLevel) LoggerBuilder // WithDynamicLevel sets a dynamic log level. Nil value will panic. Resets WithLevel() WithDynamicLevel(level LogLevelGetter) LoggerBuilder // Controls 'func' and 'caller' field computation. See also WithSkipFrameCount(). WithCaller(mode CallerFieldMode) LoggerBuilder // WithSkipFrameCount changes skipFrameCount to the absolute value. But the value can be negative, and it is applied to a baseline. Value exceeding int8 will panic WithSkipFrameCount(skipFrameCount int) LoggerBuilder // Controls collection of metrics. Required flags are ADDED to the current flags. Include specify LogMetricsResetMode to replace flags. WithMetrics(mode LogMetricsMode) LoggerBuilder //Sets an custom recorder for metric collection. WithMetricsRecorder(recorder LogMetricsRecorder) LoggerBuilder // WithFields adds fields for to-be-built logger. WithFields(map[string]interface{}) LoggerBuilder // WithField add a fields for to-be-built logger. WithField(string, interface{}) LoggerBuilder // Creates a logger. Build() (Logger, error) // Creates a logger with no write delays. BuildLowLatency() (Logger, error) }
type LoggerMock ¶ added in v0.9.2
type LoggerMock struct { CopyMock mLoggerMockCopy DebugMock mLoggerMockDebug DebugfMock mLoggerMockDebugf EmbeddableMock mLoggerMockEmbeddable ErrorMock mLoggerMockError ErrorfMock mLoggerMockErrorf EventMock mLoggerMockEvent EventfMock mLoggerMockEventf FatalMock mLoggerMockFatal FatalfMock mLoggerMockFatalf InfoMock mLoggerMockInfo InfofMock mLoggerMockInfof IsMock mLoggerMockIs LevelMock mLoggerMockLevel PanicMock mLoggerMockPanic PanicfMock mLoggerMockPanicf WarnMock mLoggerMockWarn WarnfMock mLoggerMockWarnf WithFieldMock mLoggerMockWithField WithFieldsMock mLoggerMockWithFields // contains filtered or unexported fields }
LoggerMock implements Logger
func NewLoggerMock ¶ added in v0.9.2
func NewLoggerMock(t minimock.Tester) *LoggerMock
NewLoggerMock returns a mock for Logger
func (*LoggerMock) Copy ¶ added in v0.9.8
func (mmCopy *LoggerMock) Copy() (l1 LoggerBuilder)
Copy implements Logger
func (*LoggerMock) CopyAfterCounter ¶ added in v0.9.8
func (mmCopy *LoggerMock) CopyAfterCounter() uint64
CopyAfterCounter returns a count of finished LoggerMock.Copy invocations
func (*LoggerMock) CopyBeforeCounter ¶ added in v0.9.8
func (mmCopy *LoggerMock) CopyBeforeCounter() uint64
CopyBeforeCounter returns a count of LoggerMock.Copy invocations
func (*LoggerMock) Debug ¶ added in v0.9.2
func (mmDebug *LoggerMock) Debug(p1 ...interface{})
Debug implements Logger
func (*LoggerMock) DebugAfterCounter ¶ added in v0.9.2
func (mmDebug *LoggerMock) DebugAfterCounter() uint64
DebugAfterCounter returns a count of finished LoggerMock.Debug invocations
func (*LoggerMock) DebugBeforeCounter ¶ added in v0.9.2
func (mmDebug *LoggerMock) DebugBeforeCounter() uint64
DebugBeforeCounter returns a count of LoggerMock.Debug invocations
func (*LoggerMock) Debugf ¶ added in v0.9.2
func (mmDebugf *LoggerMock) Debugf(s1 string, p1 ...interface{})
Debugf implements Logger
func (*LoggerMock) DebugfAfterCounter ¶ added in v0.9.2
func (mmDebugf *LoggerMock) DebugfAfterCounter() uint64
DebugfAfterCounter returns a count of finished LoggerMock.Debugf invocations
func (*LoggerMock) DebugfBeforeCounter ¶ added in v0.9.2
func (mmDebugf *LoggerMock) DebugfBeforeCounter() uint64
DebugfBeforeCounter returns a count of LoggerMock.Debugf invocations
func (*LoggerMock) Embeddable ¶ added in v0.9.8
func (mmEmbeddable *LoggerMock) Embeddable() (e1 EmbeddedLogger)
Embeddable implements Logger
func (*LoggerMock) EmbeddableAfterCounter ¶ added in v0.9.8
func (mmEmbeddable *LoggerMock) EmbeddableAfterCounter() uint64
EmbeddableAfterCounter returns a count of finished LoggerMock.Embeddable invocations
func (*LoggerMock) EmbeddableBeforeCounter ¶ added in v0.9.8
func (mmEmbeddable *LoggerMock) EmbeddableBeforeCounter() uint64
EmbeddableBeforeCounter returns a count of LoggerMock.Embeddable invocations
func (*LoggerMock) Error ¶ added in v0.9.2
func (mmError *LoggerMock) Error(p1 ...interface{})
Error implements Logger
func (*LoggerMock) ErrorAfterCounter ¶ added in v0.9.2
func (mmError *LoggerMock) ErrorAfterCounter() uint64
ErrorAfterCounter returns a count of finished LoggerMock.Error invocations
func (*LoggerMock) ErrorBeforeCounter ¶ added in v0.9.2
func (mmError *LoggerMock) ErrorBeforeCounter() uint64
ErrorBeforeCounter returns a count of LoggerMock.Error invocations
func (*LoggerMock) Errorf ¶ added in v0.9.2
func (mmErrorf *LoggerMock) Errorf(s1 string, p1 ...interface{})
Errorf implements Logger
func (*LoggerMock) ErrorfAfterCounter ¶ added in v0.9.2
func (mmErrorf *LoggerMock) ErrorfAfterCounter() uint64
ErrorfAfterCounter returns a count of finished LoggerMock.Errorf invocations
func (*LoggerMock) ErrorfBeforeCounter ¶ added in v0.9.2
func (mmErrorf *LoggerMock) ErrorfBeforeCounter() uint64
ErrorfBeforeCounter returns a count of LoggerMock.Errorf invocations
func (*LoggerMock) Event ¶ added in v0.9.8
func (mmEvent *LoggerMock) Event(level LogLevel, args ...interface{})
Event implements Logger
func (*LoggerMock) EventAfterCounter ¶ added in v0.9.8
func (mmEvent *LoggerMock) EventAfterCounter() uint64
EventAfterCounter returns a count of finished LoggerMock.Event invocations
func (*LoggerMock) EventBeforeCounter ¶ added in v0.9.8
func (mmEvent *LoggerMock) EventBeforeCounter() uint64
EventBeforeCounter returns a count of LoggerMock.Event invocations
func (*LoggerMock) Eventf ¶ added in v0.9.8
func (mmEventf *LoggerMock) Eventf(level LogLevel, fmt string, args ...interface{})
Eventf implements Logger
func (*LoggerMock) EventfAfterCounter ¶ added in v0.9.8
func (mmEventf *LoggerMock) EventfAfterCounter() uint64
EventfAfterCounter returns a count of finished LoggerMock.Eventf invocations
func (*LoggerMock) EventfBeforeCounter ¶ added in v0.9.8
func (mmEventf *LoggerMock) EventfBeforeCounter() uint64
EventfBeforeCounter returns a count of LoggerMock.Eventf invocations
func (*LoggerMock) Fatal ¶ added in v0.9.2
func (mmFatal *LoggerMock) Fatal(p1 ...interface{})
Fatal implements Logger
func (*LoggerMock) FatalAfterCounter ¶ added in v0.9.2
func (mmFatal *LoggerMock) FatalAfterCounter() uint64
FatalAfterCounter returns a count of finished LoggerMock.Fatal invocations
func (*LoggerMock) FatalBeforeCounter ¶ added in v0.9.2
func (mmFatal *LoggerMock) FatalBeforeCounter() uint64
FatalBeforeCounter returns a count of LoggerMock.Fatal invocations
func (*LoggerMock) Fatalf ¶ added in v0.9.2
func (mmFatalf *LoggerMock) Fatalf(s1 string, p1 ...interface{})
Fatalf implements Logger
func (*LoggerMock) FatalfAfterCounter ¶ added in v0.9.2
func (mmFatalf *LoggerMock) FatalfAfterCounter() uint64
FatalfAfterCounter returns a count of finished LoggerMock.Fatalf invocations
func (*LoggerMock) FatalfBeforeCounter ¶ added in v0.9.2
func (mmFatalf *LoggerMock) FatalfBeforeCounter() uint64
FatalfBeforeCounter returns a count of LoggerMock.Fatalf invocations
func (*LoggerMock) Info ¶ added in v0.9.2
func (mmInfo *LoggerMock) Info(p1 ...interface{})
Info implements Logger
func (*LoggerMock) InfoAfterCounter ¶ added in v0.9.2
func (mmInfo *LoggerMock) InfoAfterCounter() uint64
InfoAfterCounter returns a count of finished LoggerMock.Info invocations
func (*LoggerMock) InfoBeforeCounter ¶ added in v0.9.2
func (mmInfo *LoggerMock) InfoBeforeCounter() uint64
InfoBeforeCounter returns a count of LoggerMock.Info invocations
func (*LoggerMock) Infof ¶ added in v0.9.2
func (mmInfof *LoggerMock) Infof(s1 string, p1 ...interface{})
Infof implements Logger
func (*LoggerMock) InfofAfterCounter ¶ added in v0.9.2
func (mmInfof *LoggerMock) InfofAfterCounter() uint64
InfofAfterCounter returns a count of finished LoggerMock.Infof invocations
func (*LoggerMock) InfofBeforeCounter ¶ added in v0.9.2
func (mmInfof *LoggerMock) InfofBeforeCounter() uint64
InfofBeforeCounter returns a count of LoggerMock.Infof invocations
func (*LoggerMock) Is ¶ added in v0.9.2
func (mmIs *LoggerMock) Is(level LogLevel) (b1 bool)
Is implements Logger
func (*LoggerMock) IsAfterCounter ¶ added in v0.9.2
func (mmIs *LoggerMock) IsAfterCounter() uint64
IsAfterCounter returns a count of finished LoggerMock.Is invocations
func (*LoggerMock) IsBeforeCounter ¶ added in v0.9.2
func (mmIs *LoggerMock) IsBeforeCounter() uint64
IsBeforeCounter returns a count of LoggerMock.Is invocations
func (*LoggerMock) Level ¶ added in v0.9.8
func (mmLevel *LoggerMock) Level(lvl LogLevel) (l1 Logger)
Level implements Logger
func (*LoggerMock) LevelAfterCounter ¶ added in v0.9.8
func (mmLevel *LoggerMock) LevelAfterCounter() uint64
LevelAfterCounter returns a count of finished LoggerMock.Level invocations
func (*LoggerMock) LevelBeforeCounter ¶ added in v0.9.8
func (mmLevel *LoggerMock) LevelBeforeCounter() uint64
LevelBeforeCounter returns a count of LoggerMock.Level invocations
func (*LoggerMock) MinimockCopyDone ¶ added in v0.9.8
func (m *LoggerMock) MinimockCopyDone() bool
MinimockCopyDone returns true if the count of the Copy invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockCopyInspect ¶ added in v0.9.8
func (m *LoggerMock) MinimockCopyInspect()
MinimockCopyInspect logs each unmet expectation
func (*LoggerMock) MinimockDebugDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockDebugDone() bool
MinimockDebugDone returns true if the count of the Debug invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockDebugInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockDebugInspect()
MinimockDebugInspect logs each unmet expectation
func (*LoggerMock) MinimockDebugfDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockDebugfDone() bool
MinimockDebugfDone returns true if the count of the Debugf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockDebugfInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockDebugfInspect()
MinimockDebugfInspect logs each unmet expectation
func (*LoggerMock) MinimockEmbeddableDone ¶ added in v0.9.8
func (m *LoggerMock) MinimockEmbeddableDone() bool
MinimockEmbeddableDone returns true if the count of the Embeddable invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockEmbeddableInspect ¶ added in v0.9.8
func (m *LoggerMock) MinimockEmbeddableInspect()
MinimockEmbeddableInspect logs each unmet expectation
func (*LoggerMock) MinimockErrorDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockErrorDone() bool
MinimockErrorDone returns true if the count of the Error invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockErrorInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockErrorInspect()
MinimockErrorInspect logs each unmet expectation
func (*LoggerMock) MinimockErrorfDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockErrorfDone() bool
MinimockErrorfDone returns true if the count of the Errorf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockErrorfInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockErrorfInspect()
MinimockErrorfInspect logs each unmet expectation
func (*LoggerMock) MinimockEventDone ¶ added in v0.9.8
func (m *LoggerMock) MinimockEventDone() bool
MinimockEventDone returns true if the count of the Event invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockEventInspect ¶ added in v0.9.8
func (m *LoggerMock) MinimockEventInspect()
MinimockEventInspect logs each unmet expectation
func (*LoggerMock) MinimockEventfDone ¶ added in v0.9.8
func (m *LoggerMock) MinimockEventfDone() bool
MinimockEventfDone returns true if the count of the Eventf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockEventfInspect ¶ added in v0.9.8
func (m *LoggerMock) MinimockEventfInspect()
MinimockEventfInspect logs each unmet expectation
func (*LoggerMock) MinimockFatalDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockFatalDone() bool
MinimockFatalDone returns true if the count of the Fatal invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockFatalInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockFatalInspect()
MinimockFatalInspect logs each unmet expectation
func (*LoggerMock) MinimockFatalfDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockFatalfDone() bool
MinimockFatalfDone returns true if the count of the Fatalf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockFatalfInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockFatalfInspect()
MinimockFatalfInspect logs each unmet expectation
func (*LoggerMock) MinimockFinish ¶ added in v0.9.2
func (m *LoggerMock) MinimockFinish()
MinimockFinish checks that all mocked methods have been called the expected number of times
func (*LoggerMock) MinimockInfoDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockInfoDone() bool
MinimockInfoDone returns true if the count of the Info invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockInfoInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockInfoInspect()
MinimockInfoInspect logs each unmet expectation
func (*LoggerMock) MinimockInfofDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockInfofDone() bool
MinimockInfofDone returns true if the count of the Infof invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockInfofInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockInfofInspect()
MinimockInfofInspect logs each unmet expectation
func (*LoggerMock) MinimockIsDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockIsDone() bool
MinimockIsDone returns true if the count of the Is invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockIsInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockIsInspect()
MinimockIsInspect logs each unmet expectation
func (*LoggerMock) MinimockLevelDone ¶ added in v0.9.8
func (m *LoggerMock) MinimockLevelDone() bool
MinimockLevelDone returns true if the count of the Level invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockLevelInspect ¶ added in v0.9.8
func (m *LoggerMock) MinimockLevelInspect()
MinimockLevelInspect logs each unmet expectation
func (*LoggerMock) MinimockPanicDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockPanicDone() bool
MinimockPanicDone returns true if the count of the Panic invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockPanicInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockPanicInspect()
MinimockPanicInspect logs each unmet expectation
func (*LoggerMock) MinimockPanicfDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockPanicfDone() bool
MinimockPanicfDone returns true if the count of the Panicf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockPanicfInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockPanicfInspect()
MinimockPanicfInspect logs each unmet expectation
func (*LoggerMock) MinimockWait ¶ added in v0.9.2
func (m *LoggerMock) MinimockWait(timeout mm_time.Duration)
MinimockWait waits for all mocked methods to be called the expected number of times
func (*LoggerMock) MinimockWarnDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockWarnDone() bool
MinimockWarnDone returns true if the count of the Warn invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockWarnInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockWarnInspect()
MinimockWarnInspect logs each unmet expectation
func (*LoggerMock) MinimockWarnfDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockWarnfDone() bool
MinimockWarnfDone returns true if the count of the Warnf invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockWarnfInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockWarnfInspect()
MinimockWarnfInspect logs each unmet expectation
func (*LoggerMock) MinimockWithFieldDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockWithFieldDone() bool
MinimockWithFieldDone returns true if the count of the WithField invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockWithFieldInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockWithFieldInspect()
MinimockWithFieldInspect logs each unmet expectation
func (*LoggerMock) MinimockWithFieldsDone ¶ added in v0.9.2
func (m *LoggerMock) MinimockWithFieldsDone() bool
MinimockWithFieldsDone returns true if the count of the WithFields invocations corresponds the number of defined expectations
func (*LoggerMock) MinimockWithFieldsInspect ¶ added in v0.9.2
func (m *LoggerMock) MinimockWithFieldsInspect()
MinimockWithFieldsInspect logs each unmet expectation
func (*LoggerMock) Panic ¶ added in v0.9.2
func (mmPanic *LoggerMock) Panic(p1 ...interface{})
Panic implements Logger
func (*LoggerMock) PanicAfterCounter ¶ added in v0.9.2
func (mmPanic *LoggerMock) PanicAfterCounter() uint64
PanicAfterCounter returns a count of finished LoggerMock.Panic invocations
func (*LoggerMock) PanicBeforeCounter ¶ added in v0.9.2
func (mmPanic *LoggerMock) PanicBeforeCounter() uint64
PanicBeforeCounter returns a count of LoggerMock.Panic invocations
func (*LoggerMock) Panicf ¶ added in v0.9.2
func (mmPanicf *LoggerMock) Panicf(s1 string, p1 ...interface{})
Panicf implements Logger
func (*LoggerMock) PanicfAfterCounter ¶ added in v0.9.2
func (mmPanicf *LoggerMock) PanicfAfterCounter() uint64
PanicfAfterCounter returns a count of finished LoggerMock.Panicf invocations
func (*LoggerMock) PanicfBeforeCounter ¶ added in v0.9.2
func (mmPanicf *LoggerMock) PanicfBeforeCounter() uint64
PanicfBeforeCounter returns a count of LoggerMock.Panicf invocations
func (*LoggerMock) Warn ¶ added in v0.9.2
func (mmWarn *LoggerMock) Warn(p1 ...interface{})
Warn implements Logger
func (*LoggerMock) WarnAfterCounter ¶ added in v0.9.2
func (mmWarn *LoggerMock) WarnAfterCounter() uint64
WarnAfterCounter returns a count of finished LoggerMock.Warn invocations
func (*LoggerMock) WarnBeforeCounter ¶ added in v0.9.2
func (mmWarn *LoggerMock) WarnBeforeCounter() uint64
WarnBeforeCounter returns a count of LoggerMock.Warn invocations
func (*LoggerMock) Warnf ¶ added in v0.9.2
func (mmWarnf *LoggerMock) Warnf(s1 string, p1 ...interface{})
Warnf implements Logger
func (*LoggerMock) WarnfAfterCounter ¶ added in v0.9.2
func (mmWarnf *LoggerMock) WarnfAfterCounter() uint64
WarnfAfterCounter returns a count of finished LoggerMock.Warnf invocations
func (*LoggerMock) WarnfBeforeCounter ¶ added in v0.9.2
func (mmWarnf *LoggerMock) WarnfBeforeCounter() uint64
WarnfBeforeCounter returns a count of LoggerMock.Warnf invocations
func (*LoggerMock) WithField ¶ added in v0.9.2
func (mmWithField *LoggerMock) WithField(s1 string, p1 interface{}) (l1 Logger)
WithField implements Logger
func (*LoggerMock) WithFieldAfterCounter ¶ added in v0.9.2
func (mmWithField *LoggerMock) WithFieldAfterCounter() uint64
WithFieldAfterCounter returns a count of finished LoggerMock.WithField invocations
func (*LoggerMock) WithFieldBeforeCounter ¶ added in v0.9.2
func (mmWithField *LoggerMock) WithFieldBeforeCounter() uint64
WithFieldBeforeCounter returns a count of LoggerMock.WithField invocations
func (*LoggerMock) WithFields ¶ added in v0.9.2
func (mmWithFields *LoggerMock) WithFields(m1 map[string]interface{}) (l1 Logger)
WithFields implements Logger
func (*LoggerMock) WithFieldsAfterCounter ¶ added in v0.9.2
func (mmWithFields *LoggerMock) WithFieldsAfterCounter() uint64
WithFieldsAfterCounter returns a count of finished LoggerMock.WithFields invocations
func (*LoggerMock) WithFieldsBeforeCounter ¶ added in v0.9.2
func (mmWithFields *LoggerMock) WithFieldsBeforeCounter() uint64
WithFieldsBeforeCounter returns a count of LoggerMock.WithFields invocations
type LoggerMockCopyExpectation ¶ added in v0.9.8
type LoggerMockCopyExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockCopyExpectation specifies expectation struct of the Logger.Copy
type LoggerMockCopyResults ¶ added in v0.9.8
type LoggerMockCopyResults struct {
// contains filtered or unexported fields
}
LoggerMockCopyResults contains results of the Logger.Copy
type LoggerMockDebugExpectation ¶ added in v0.9.2
type LoggerMockDebugExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockDebugExpectation specifies expectation struct of the Logger.Debug
type LoggerMockDebugParams ¶ added in v0.9.2
type LoggerMockDebugParams struct {
// contains filtered or unexported fields
}
LoggerMockDebugParams contains parameters of the Logger.Debug
type LoggerMockDebugfExpectation ¶ added in v0.9.2
type LoggerMockDebugfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockDebugfExpectation specifies expectation struct of the Logger.Debugf
type LoggerMockDebugfParams ¶ added in v0.9.2
type LoggerMockDebugfParams struct {
// contains filtered or unexported fields
}
LoggerMockDebugfParams contains parameters of the Logger.Debugf
type LoggerMockEmbeddableExpectation ¶ added in v0.9.8
type LoggerMockEmbeddableExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockEmbeddableExpectation specifies expectation struct of the Logger.Embeddable
type LoggerMockEmbeddableResults ¶ added in v0.9.8
type LoggerMockEmbeddableResults struct {
// contains filtered or unexported fields
}
LoggerMockEmbeddableResults contains results of the Logger.Embeddable
type LoggerMockErrorExpectation ¶ added in v0.9.2
type LoggerMockErrorExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockErrorExpectation specifies expectation struct of the Logger.Error
type LoggerMockErrorParams ¶ added in v0.9.2
type LoggerMockErrorParams struct {
// contains filtered or unexported fields
}
LoggerMockErrorParams contains parameters of the Logger.Error
type LoggerMockErrorfExpectation ¶ added in v0.9.2
type LoggerMockErrorfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockErrorfExpectation specifies expectation struct of the Logger.Errorf
type LoggerMockErrorfParams ¶ added in v0.9.2
type LoggerMockErrorfParams struct {
// contains filtered or unexported fields
}
LoggerMockErrorfParams contains parameters of the Logger.Errorf
type LoggerMockEventExpectation ¶ added in v0.9.8
type LoggerMockEventExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockEventExpectation specifies expectation struct of the Logger.Event
type LoggerMockEventParams ¶ added in v0.9.8
type LoggerMockEventParams struct {
// contains filtered or unexported fields
}
LoggerMockEventParams contains parameters of the Logger.Event
type LoggerMockEventfExpectation ¶ added in v0.9.8
type LoggerMockEventfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockEventfExpectation specifies expectation struct of the Logger.Eventf
type LoggerMockEventfParams ¶ added in v0.9.8
type LoggerMockEventfParams struct {
// contains filtered or unexported fields
}
LoggerMockEventfParams contains parameters of the Logger.Eventf
type LoggerMockFatalExpectation ¶ added in v0.9.2
type LoggerMockFatalExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockFatalExpectation specifies expectation struct of the Logger.Fatal
type LoggerMockFatalParams ¶ added in v0.9.2
type LoggerMockFatalParams struct {
// contains filtered or unexported fields
}
LoggerMockFatalParams contains parameters of the Logger.Fatal
type LoggerMockFatalfExpectation ¶ added in v0.9.2
type LoggerMockFatalfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockFatalfExpectation specifies expectation struct of the Logger.Fatalf
type LoggerMockFatalfParams ¶ added in v0.9.2
type LoggerMockFatalfParams struct {
// contains filtered or unexported fields
}
LoggerMockFatalfParams contains parameters of the Logger.Fatalf
type LoggerMockInfoExpectation ¶ added in v0.9.2
type LoggerMockInfoExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockInfoExpectation specifies expectation struct of the Logger.Info
type LoggerMockInfoParams ¶ added in v0.9.2
type LoggerMockInfoParams struct {
// contains filtered or unexported fields
}
LoggerMockInfoParams contains parameters of the Logger.Info
type LoggerMockInfofExpectation ¶ added in v0.9.2
type LoggerMockInfofExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockInfofExpectation specifies expectation struct of the Logger.Infof
type LoggerMockInfofParams ¶ added in v0.9.2
type LoggerMockInfofParams struct {
// contains filtered or unexported fields
}
LoggerMockInfofParams contains parameters of the Logger.Infof
type LoggerMockIsExpectation ¶ added in v0.9.2
type LoggerMockIsExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockIsExpectation specifies expectation struct of the Logger.Is
func (*LoggerMockIsExpectation) Then ¶ added in v0.9.2
func (e *LoggerMockIsExpectation) Then(b1 bool) *LoggerMock
Then sets up Logger.Is return parameters for the expectation previously defined by the When method
type LoggerMockIsParams ¶ added in v0.9.2
type LoggerMockIsParams struct {
// contains filtered or unexported fields
}
LoggerMockIsParams contains parameters of the Logger.Is
type LoggerMockIsResults ¶ added in v0.9.2
type LoggerMockIsResults struct {
// contains filtered or unexported fields
}
LoggerMockIsResults contains results of the Logger.Is
type LoggerMockLevelExpectation ¶ added in v0.9.8
type LoggerMockLevelExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockLevelExpectation specifies expectation struct of the Logger.Level
func (*LoggerMockLevelExpectation) Then ¶ added in v0.9.8
func (e *LoggerMockLevelExpectation) Then(l1 Logger) *LoggerMock
Then sets up Logger.Level return parameters for the expectation previously defined by the When method
type LoggerMockLevelParams ¶ added in v0.9.8
type LoggerMockLevelParams struct {
// contains filtered or unexported fields
}
LoggerMockLevelParams contains parameters of the Logger.Level
type LoggerMockLevelResults ¶ added in v0.9.8
type LoggerMockLevelResults struct {
// contains filtered or unexported fields
}
LoggerMockLevelResults contains results of the Logger.Level
type LoggerMockPanicExpectation ¶ added in v0.9.2
type LoggerMockPanicExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockPanicExpectation specifies expectation struct of the Logger.Panic
type LoggerMockPanicParams ¶ added in v0.9.2
type LoggerMockPanicParams struct {
// contains filtered or unexported fields
}
LoggerMockPanicParams contains parameters of the Logger.Panic
type LoggerMockPanicfExpectation ¶ added in v0.9.2
type LoggerMockPanicfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockPanicfExpectation specifies expectation struct of the Logger.Panicf
type LoggerMockPanicfParams ¶ added in v0.9.2
type LoggerMockPanicfParams struct {
// contains filtered or unexported fields
}
LoggerMockPanicfParams contains parameters of the Logger.Panicf
type LoggerMockWarnExpectation ¶ added in v0.9.2
type LoggerMockWarnExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockWarnExpectation specifies expectation struct of the Logger.Warn
type LoggerMockWarnParams ¶ added in v0.9.2
type LoggerMockWarnParams struct {
// contains filtered or unexported fields
}
LoggerMockWarnParams contains parameters of the Logger.Warn
type LoggerMockWarnfExpectation ¶ added in v0.9.2
type LoggerMockWarnfExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockWarnfExpectation specifies expectation struct of the Logger.Warnf
type LoggerMockWarnfParams ¶ added in v0.9.2
type LoggerMockWarnfParams struct {
// contains filtered or unexported fields
}
LoggerMockWarnfParams contains parameters of the Logger.Warnf
type LoggerMockWithFieldExpectation ¶ added in v0.9.2
type LoggerMockWithFieldExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockWithFieldExpectation specifies expectation struct of the Logger.WithField
func (*LoggerMockWithFieldExpectation) Then ¶ added in v0.9.2
func (e *LoggerMockWithFieldExpectation) Then(l1 Logger) *LoggerMock
Then sets up Logger.WithField return parameters for the expectation previously defined by the When method
type LoggerMockWithFieldParams ¶ added in v0.9.2
type LoggerMockWithFieldParams struct {
// contains filtered or unexported fields
}
LoggerMockWithFieldParams contains parameters of the Logger.WithField
type LoggerMockWithFieldResults ¶ added in v0.9.2
type LoggerMockWithFieldResults struct {
// contains filtered or unexported fields
}
LoggerMockWithFieldResults contains results of the Logger.WithField
type LoggerMockWithFieldsExpectation ¶ added in v0.9.2
type LoggerMockWithFieldsExpectation struct { Counter uint64 // contains filtered or unexported fields }
LoggerMockWithFieldsExpectation specifies expectation struct of the Logger.WithFields
func (*LoggerMockWithFieldsExpectation) Then ¶ added in v0.9.2
func (e *LoggerMockWithFieldsExpectation) Then(l1 Logger) *LoggerMock
Then sets up Logger.WithFields return parameters for the expectation previously defined by the When method
type LoggerMockWithFieldsParams ¶ added in v0.9.2
type LoggerMockWithFieldsParams struct {
// contains filtered or unexported fields
}
LoggerMockWithFieldsParams contains parameters of the Logger.WithFields
type LoggerMockWithFieldsResults ¶ added in v0.9.2
type LoggerMockWithFieldsResults struct {
// contains filtered or unexported fields
}
LoggerMockWithFieldsResults contains results of the Logger.WithFields
type LoggerOutput ¶ added in v0.9.8
type LoggerOutputGetter ¶ added in v0.9.8
type LoggerOutputGetter interface {
GetLoggerOutput() LoggerOutput
}
type LogicCallContext ¶
type LogicCallContext struct { Mode CallMode // either "execution" or "validation" Request *Reference // reference of incoming request record Callee *Reference // Contract that is called Parent *Reference // Parent of the callee Prototype *Reference // Prototype (base class) of the callee Code *Reference // Code reference of the callee Caller *Reference // Contract that made the call CallerPrototype *Reference // Prototype (base class) of the caller TraceID string // trace mark for Jaegar and friends }
LogicCallContext is a context of contract execution. Everything that is required to implement foundation functions. This struct shouldn't be used in core components.
type LogicRunner ¶
type LogicRunner interface { LRI() OnPulse(context.Context, Pulse, Pulse) error AddUnwantedResponse(ctx context.Context, msg Payload) error }
LogicRunner is an interface that should satisfy logic executor
type MachineLogicExecutor ¶
type MachineLogicExecutor interface { CallMethod( ctx context.Context, callContext *LogicCallContext, code Reference, data []byte, method string, args Arguments, ) ( newObjectState []byte, methodResults Arguments, err error, ) CallConstructor( ctx context.Context, callContext *LogicCallContext, code Reference, name string, args Arguments, ) ( objectState []byte, result Arguments, err error, ) }
MachineLogicExecutor is an interface for implementers of one particular machine type
type MachineType ¶
type MachineType int
MachineType is a type of virtual machine
const ( MachineTypeNotExist = 0 MachineTypeBuiltin MachineType = iota + 1 MachineTypeGoPlugin MachineTypesLastID )
Real constants of MachineType
func (MachineType) Equal ¶
func (m MachineType) Equal(other MachineType) bool
type NetworkNode ¶
type NetworkNode interface { // ID is the unique identifier of the node ID() Reference // ShortID get short ID of node ShortID() ShortNodeID // Role is the candidate Role for the node Role() StaticRole // PublicKey is the public key of the node PublicKey() crypto.PublicKey // Address is the network address of the node Address() string // GetGlobuleID returns node current globule id GetGlobuleID() GlobuleID // Version of node software Version() string // LeavingETA is pulse number, after which node leave LeavingETA() PulseNumber // GetState get state of the node GetState() NodeState // GetPower get power of node GetPower() Power }
type NetworkState ¶
type NetworkState int
NetworkState type for bootstrapping process
const ( // NoNetworkState state means that nodes doesn`t match majority_rule NoNetworkState NetworkState = iota JoinerBootstrap WaitConsensus WaitMajority WaitMinRoles WaitPulsar CompleteNetworkState )
func (NetworkState) String ¶
func (i NetworkState) String() string
type NetworkStatus ¶
type NetworkStatus interface {
GetNetworkStatus() StatusReply
}
type Node ¶
type Node struct { Polymorph int32 `protobuf:"varint,16,opt,name=polymorph,proto3" json:"polymorph,omitempty"` ID Reference `protobuf:"bytes,20,opt,name=ID,proto3,customtype=Reference" json:"ID"` Role StaticRole `protobuf:"varint,21,opt,name=Role,proto3,customtype=StaticRole" json:"Role"` }
func (*Node) Descriptor ¶ added in v0.9.5
func (*Node) ProtoMessage ¶ added in v0.9.5
func (*Node) ProtoMessage()
func (*Node) XXX_DiscardUnknown ¶ added in v0.9.5
func (m *Node) XXX_DiscardUnknown()
func (*Node) XXX_Marshal ¶ added in v0.9.5
func (*Node) XXX_Unmarshal ¶ added in v0.9.5
type NodeList ¶ added in v0.9.5
type NodeList struct { Polymorph int32 `protobuf:"varint,16,opt,name=polymorph,proto3" json:"polymorph,omitempty"` Nodes []Node `protobuf:"bytes,20,rep,name=Nodes,proto3" json:"Nodes"` }
func (*NodeList) Descriptor ¶ added in v0.9.5
func (*NodeList) ProtoMessage ¶ added in v0.9.5
func (*NodeList) ProtoMessage()
func (*NodeList) XXX_DiscardUnknown ¶ added in v0.9.5
func (m *NodeList) XXX_DiscardUnknown()
func (*NodeList) XXX_Marshal ¶ added in v0.9.5
func (*NodeList) XXX_Unmarshal ¶ added in v0.9.5
type NodeState ¶
type NodeState uint8
NodeState is the state of the node
const ( // NodeUndefined node started but is not connected to network yet NodeUndefined NodeState = iota // NodeJoining node is in first pulse of discovery bootstrap or is joining to a bootstrapped network NodeJoining // NodeReady node is connected to network NodeReady // NodeLeaving node is about to leave network NodeLeaving )
type PendingState ¶
type PendingState int
PendingState is a state of execution for each object
const ( PendingUnknown PendingState = iota // PendingUnknown signalizes that we don't know about execution state NotPending // NotPending means that we know that this task is not executed by another VE InPending // InPending means that we know that method on object is executed by another VE )
func (PendingState) Equal ¶
func (s PendingState) Equal(other PendingState) bool
func (PendingState) String ¶ added in v0.9.2
func (i PendingState) String() string
type PlatformCryptographyScheme ¶
type PlatformCryptographyScheme interface { PublicKeySize() int SignatureSize() int ReferenceHashSize() int IntegrityHashSize() int ReferenceHasher() Hasher IntegrityHasher() Hasher DataSigner(crypto.PrivateKey, Hasher) Signer DigestSigner(key crypto.PrivateKey) Signer DataVerifier(crypto.PublicKey, Hasher) Verifier DigestVerifier(crypto.PublicKey) Verifier }
type Pulse ¶
type Pulse struct { PulseNumber PulseNumber PrevPulseNumber PulseNumber NextPulseNumber PulseNumber PulseTimestamp int64 EpochPulseNumber int OriginID [OriginIDSize]byte Entropy Entropy Signs map[string]PulseSenderConfirmation }
Pulse is base data structure for a pulse.
type PulseDistributor ¶
type PulseDistributor interface { // Distribute distributes a pulse across the network. Distribute(context.Context, Pulse) }
PulseDistributor is interface for pulse distribution.
type PulseManager ¶
type PulseManager interface { // Set set's new pulse and closes current jet drop. If dry is true, nothing will be saved to storage. Set(ctx context.Context, pulse Pulse) error }
PulseManager provides Ledger's methods related to Pulse.
type PulseNumber ¶
PulseNumber is a sequential number of Pulse. Upper 2 bits are reserved for use in references (scope), must be zero otherwise. Valid Absolute PulseNumber must be >65536. If PulseNumber <65536 it is a relative PulseNumber
func NewPulseNumber ¶
func NewPulseNumber(buf []byte) PulseNumber
NewPulseNumber creates pulse number from bytes.
func NewPulseNumberFromStr ¶
func NewPulseNumberFromStr(pn string) (PulseNumber, error)
type PulseRange ¶
type PulseRange struct { Begin PulseNumber End PulseNumber }
PulseRange represents range of pulses.
func (*PulseRange) String ¶
func (pr *PulseRange) String() string
type PulseSenderConfirmation ¶
type PulseSenderConfirmation struct { PulseNumber PulseNumber ChosenPublicKey string Entropy Entropy Signature []byte }
PulseSenderConfirmation contains confirmations of the pulse from other pulsars Because the system is using BFT for consensus between pulsars, because of it All pulsar send to the chosen pulsar their confirmations Every node in the network can verify the signatures
type Reference ¶
Reference is a unified record reference
func NewEmptyReference ¶
func NewEmptyReference() *Reference
NewEmptyReference returns empty Reference.
func NewGlobalReference ¶
func NewObjectReferenceFromBase58 ¶ added in v0.9.13
NewObjectReferenceFromBase58 deserializes reference from base58 encoded string and checks if it object reference
func NewRecordReference ¶ added in v0.9.1
func NewReference ¶
NewReference returns Reference composed from domain and record.
func NewReferenceFromBase58 ¶
NewReferenceFromBase58 deserializes reference from base58 encoded string
func NewReferenceFromBytes ¶
NewReferenceFromBytes : After CBOR Marshal/Unmarshal Ref can be converted to byte slice, this converts it back
type Reply ¶
type Reply interface { // Type returns message type. Type() ReplyType }
Reply for an `Message`
type ShortNodeID ¶
type ShortNodeID uint32 // ZERO is RESERVED
ShortNodeID is the shortened ID of node that is unique inside the globe
const AbsentShortNodeID ShortNodeID = 0
func (ShortNodeID) Equal ¶
func (v ShortNodeID) Equal(other ShortNodeID) bool
func (ShortNodeID) IsAbsent ¶
func (v ShortNodeID) IsAbsent() bool
type Signature ¶
type Signature struct {
// contains filtered or unexported fields
}
func SignatureFromBytes ¶
type StaticRole ¶
type StaticRole uint32
StaticRole holds role of node.
func GetStaticRoleFromString ¶
func GetStaticRoleFromString(role string) StaticRole
GetStaticRoleFromString converts role from string to StaticRole.
func (StaticRole) Equal ¶ added in v0.9.5
func (nr StaticRole) Equal(anr StaticRole) bool
func (StaticRole) String ¶
func (nr StaticRole) String() string
type StatusReply ¶
type StatusReply struct { NetworkState NetworkState Origin NetworkNode ActiveListSize int WorkingListSize int // Nodes from active list Nodes []NetworkNode // Pulse from network pulse storage Pulse Pulse Version string Timestamp time.Time // node start timestamp for uptime duration StartTime time.Time }
Source Files ¶
- apirunner.go
- certificate.go
- contractrequester.go
- cryptography.go
- doc.go
- dynamicrole_string.go
- errors.go
- genesis.go
- insolar.go
- jet.go
- keystore.go
- logger.go
- logger_mock.go
- messagebus.go
- network.go
- networkstate_string.go
- node.pb.go
- nodenetwork.go
- noderole.go
- nodestate_string.go
- pendingstate_string.go
- platformpolicy.go
- pulse.go
- record.go
- role.go
- serialization.go
- vm.go
Directories ¶
Path | Synopsis |
---|---|
Package backoff provides an exponential-backoff implementation.
|
Package backoff provides an exponential-backoff implementation. |
Package gen contains functions for generating random base insolar types.
|
Package gen contains functions for generating random base insolar types. |
Package jet provides objects and interfaces for working with Jet objects.
|
Package jet provides objects and interfaces for working with Jet objects. |
Package jetcoordinator is responsible for all jet manipulations.
|
Package jetcoordinator is responsible for all jet manipulations. |
Package node contains node storage
|
Package node contains node storage |
Package Pulse contains Pulse storage.
|
Package Pulse contains Pulse storage. |
Package reply represents responses to messages of the messagebus
|
Package reply represents responses to messages of the messagebus |
Package db contains primitives for storing and indexing data.
|
Package db contains primitives for storing and indexing data. |