Documentation ¶
Overview ¶
package network holds core protocol types and constants
Index ¶
- Variables
- type CronSchedule
- type GlobalValues
- func (g *GlobalValues) BvnExecutorVersion() protocol.ExecutorVersion
- func (g *GlobalValues) BvnNames() []string
- func (g *GlobalValues) ChainID() *big.Int
- func (v *GlobalValues) Copy() *GlobalValues
- func (v *GlobalValues) CopyAsInterface() interface{}
- func (v *GlobalValues) Equal(u *GlobalValues) bool
- func (g *GlobalValues) FormatGlobals() protocol.DataEntry
- func (g *GlobalValues) FormatNetwork() protocol.DataEntry
- func (g *GlobalValues) FormatOracle() protocol.DataEntry
- func (g *GlobalValues) FormatRouting() protocol.DataEntry
- func (g *GlobalValues) InitializeDataAccounts(net *url.URL, getState getStateFunc, putState putStateFunc) error
- func (v *GlobalValues) IsValid() error
- func (g *GlobalValues) Load(net *url.URL, getState getStateFunc) error
- func (g *GlobalValues) LoadGlobals(net *url.URL, getState getStateFunc) error
- func (g *GlobalValues) LoadNetwork(net *url.URL, getState getStateFunc) error
- func (g *GlobalValues) LoadOracle(net *url.URL, getState getStateFunc) error
- func (g *GlobalValues) LoadRouting(net *url.URL, getState getStateFunc) error
- func (g *GlobalValues) MajorBlockSchedule() cron.Schedule
- func (v *GlobalValues) MarshalBinary() ([]byte, error)
- func (v *GlobalValues) MarshalJSON() ([]byte, error)
- func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
- func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
- func (v *GlobalValues) UnmarshalBinary(data []byte) error
- func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
- func (v *GlobalValues) UnmarshalJSON(b []byte) error
- func (g *GlobalValues) ValidatorThreshold(partition string) uint64
Constants ¶
This section is empty.
Variables ¶
View Source
var CronFormat = cron.NewParser(cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor)
Functions ¶
This section is empty.
Types ¶
type CronSchedule ¶ added in v1.4.0
type CronSchedule struct {
// contains filtered or unexported fields
}
func MustParseCron ¶ added in v1.4.0
func MustParseCron(spec string) *CronSchedule
func ParseCron ¶ added in v1.4.0
func ParseCron(spec string) (*CronSchedule, error)
func (*CronSchedule) Copy ¶ added in v1.4.0
func (s *CronSchedule) Copy() *CronSchedule
func (*CronSchedule) Equal ¶ added in v1.4.0
func (s *CronSchedule) Equal(r *CronSchedule) bool
func (*CronSchedule) MarshalJSON ¶ added in v1.4.0
func (s *CronSchedule) MarshalJSON() ([]byte, error)
func (*CronSchedule) UnmarshalJSON ¶ added in v1.4.0
func (s *CronSchedule) UnmarshalJSON(data []byte) error
type GlobalValues ¶
type GlobalValues struct { Oracle *protocol.AcmeOracle `json:"oracle,omitempty" form:"oracle" query:"oracle" validate:"required"` Globals *protocol.NetworkGlobals `json:"globals,omitempty" form:"globals" query:"globals" validate:"required"` Network *protocol.NetworkDefinition `json:"network,omitempty" form:"network" query:"network" validate:"required"` Routing *protocol.RoutingTable `json:"routing,omitempty" form:"routing" query:"routing" validate:"required"` // ExecutorVersion is the active executor version. ExecutorVersion protocol.ExecutorVersion `json:"executorVersion,omitempty" form:"executorVersion" query:"executorVersion"` // BvnExecutorVersions is the active executor version of each BVN. BvnExecutorVersions []*protocol.PartitionExecutorVersion `json:"bvnExecutorVersions,omitempty" form:"bvnExecutorVersions" query:"bvnExecutorVersions" validate:"required"` // contains filtered or unexported fields }
func NewGlobals ¶
func NewGlobals(g *GlobalValues) *GlobalValues
NewGlobals returns GlobalValues with uninitialized values set to the default.
func (*GlobalValues) BvnExecutorVersion ¶ added in v1.4.0
func (g *GlobalValues) BvnExecutorVersion() protocol.ExecutorVersion
func (*GlobalValues) BvnNames ¶ added in v1.3.0
func (g *GlobalValues) BvnNames() []string
func (*GlobalValues) ChainID ¶ added in v1.4.0
func (g *GlobalValues) ChainID() *big.Int
func (*GlobalValues) Copy ¶
func (v *GlobalValues) Copy() *GlobalValues
func (*GlobalValues) CopyAsInterface ¶
func (v *GlobalValues) CopyAsInterface() interface{}
func (*GlobalValues) Equal ¶
func (v *GlobalValues) Equal(u *GlobalValues) bool
func (*GlobalValues) FormatGlobals ¶
func (g *GlobalValues) FormatGlobals() protocol.DataEntry
func (*GlobalValues) FormatNetwork ¶
func (g *GlobalValues) FormatNetwork() protocol.DataEntry
func (*GlobalValues) FormatOracle ¶
func (g *GlobalValues) FormatOracle() protocol.DataEntry
func (*GlobalValues) FormatRouting ¶
func (g *GlobalValues) FormatRouting() protocol.DataEntry
func (*GlobalValues) InitializeDataAccounts ¶
func (g *GlobalValues) InitializeDataAccounts(net *url.URL, getState getStateFunc, putState putStateFunc) error
InitializeDataAccounts sets the initial state of the network data accounts for genesis.
func (*GlobalValues) IsValid ¶
func (v *GlobalValues) IsValid() error
func (*GlobalValues) LoadGlobals ¶ added in v1.4.0
func (g *GlobalValues) LoadGlobals(net *url.URL, getState getStateFunc) error
func (*GlobalValues) LoadNetwork ¶ added in v1.4.0
func (g *GlobalValues) LoadNetwork(net *url.URL, getState getStateFunc) error
func (*GlobalValues) LoadOracle ¶ added in v1.4.0
func (g *GlobalValues) LoadOracle(net *url.URL, getState getStateFunc) error
func (*GlobalValues) LoadRouting ¶ added in v1.4.0
func (g *GlobalValues) LoadRouting(net *url.URL, getState getStateFunc) error
func (*GlobalValues) MajorBlockSchedule ¶ added in v1.4.0
func (g *GlobalValues) MajorBlockSchedule() cron.Schedule
func (*GlobalValues) MarshalBinary ¶
func (v *GlobalValues) MarshalBinary() ([]byte, error)
func (*GlobalValues) MarshalJSON ¶
func (v *GlobalValues) MarshalJSON() ([]byte, error)
func (*GlobalValues) ParseGlobals ¶
func (g *GlobalValues) ParseGlobals(entry protocol.DataEntry) error
func (*GlobalValues) ParseNetwork ¶
func (g *GlobalValues) ParseNetwork(entry protocol.DataEntry) error
func (*GlobalValues) ParseOracle ¶
func (g *GlobalValues) ParseOracle(entry protocol.DataEntry) error
func (*GlobalValues) ParseRouting ¶
func (g *GlobalValues) ParseRouting(entry protocol.DataEntry) error
func (*GlobalValues) UnmarshalBinary ¶
func (v *GlobalValues) UnmarshalBinary(data []byte) error
func (*GlobalValues) UnmarshalBinaryFrom ¶
func (v *GlobalValues) UnmarshalBinaryFrom(rd io.Reader) error
func (*GlobalValues) UnmarshalJSON ¶
func (v *GlobalValues) UnmarshalJSON(b []byte) error
func (*GlobalValues) ValidatorThreshold ¶
func (g *GlobalValues) ValidatorThreshold(partition string) uint64
Click to show internal directories.
Click to hide internal directories.