Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the ethereum v1alpha1 API group +kubebuilder:object:generate=true +groupName=ethereum.applying.cool
Index ¶
- Constants
- Variables
- type Account
- type Cluster
- type ClusterList
- type ClusterSpec
- type ClusterStatus
- type Enode
- type EthereumAddress
- type Genesis
- type Hash
- type HexString
- type Node
- func (in *Node) DeepCopy() *Node
- func (in *Node) DeepCopyInto(out *Node)
- func (in *Node) DeepCopyObject() runtime.Object
- func (r *Node) Default()
- func (r *Node) DefaultNodePorts()
- func (r *Node) DefaultNodeResources()
- func (r *Node) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *Node) ValidateCreate() error
- func (r *Node) ValidateDelete() error
- func (r *Node) ValidateUpdate(old runtime.Object) error
- type NodeList
- type NodeSpec
- type NodeStatus
- type NodeTemplate
- type NodeType
- type Ports
- type QBFT
Constants ¶
const ( DefaultNodeCPURequest = "2" DefaultNodeCPULimit = "3" DefaultkNodeMemoryRequest = "4Gi" DefaultNodeMemoryLimit = "6Gi" DefaultNodeStorageRequest = "100Gi" )
Node Resources
const ( DefaultNetworkID = 1337 DefaultChainID = 1337 //QBFT DefaultQBFTEpochLength = 30000 DefaultQBFTBlockPeriodSeconds = 5 DefaultQBFTRequestTimeoutSeconds = 10 //Istanbul DefaultIstanbulCeil2Nby3Block = 0 DefaultIstanbulEpoch = 30000 DefaultIstanbulPolicy = 0 DefaultIstanbulTestQBFTBlock = 0 )
Genesis
const ( DefaultP2PPort = 30303 DefaultRPCPort = 8545 DefaultWSPort = 8546 DefaultGraphQLPort = 8547 DefaultRLPXPort = 30303 DefaultMetricsPort = 9545 )
Node Ports
const GoQuorumHomeDir = "/home/quorum"
GoQuorumHomeDir is goquorum home directory
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "ethereum.applying.cool", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { // Address is account address Address EthereumAddress `json:"address"` // Balance is account balance in wei Balance string `json:"balance,omitempty"` }
Account is Ethereum account
func (*Account) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Account.
func (*Account) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Cluster ¶
type Cluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ClusterSpec `json:"spec,omitempty"` Status ClusterStatus `json:"status,omitempty"` }
Cluster is the Schema for the clusters API
func (*Cluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Cluster.
func (*Cluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Cluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterList ¶
type ClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Cluster `json:"items"` }
ClusterList contains a list of Cluster
func (*ClusterList) DeepCopy ¶
func (in *ClusterList) DeepCopy() *ClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterList.
func (*ClusterList) DeepCopyInto ¶
func (in *ClusterList) DeepCopyInto(out *ClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterList) DeepCopyObject ¶
func (in *ClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterSpec ¶
type ClusterSpec struct { // Image is Ethereum node client image Image string `json:"image,omitempty"` // used to derive ethereum account. Mnemonic string `json:"mnemonic"` // Genesis is genesis block configuration Genesis *Genesis `json:"genesis"` // validator is validators of qbft consensus. Validator NodeTemplate `json:"validator,omitempty"` // member is static nodes. Member NodeTemplate `json:"member,omitempty"` // node ports Ports `json:"ports,omitempty"` }
ClusterSpec defines the desired state of Cluster
func (*ClusterSpec) DeepCopy ¶
func (in *ClusterSpec) DeepCopy() *ClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterSpec.
func (*ClusterSpec) DeepCopyInto ¶
func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterStatus ¶
type ClusterStatus struct { }
ClusterStatus defines the observed state of Cluster
func (*ClusterStatus) DeepCopy ¶
func (in *ClusterStatus) DeepCopy() *ClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterStatus.
func (*ClusterStatus) DeepCopyInto ¶
func (in *ClusterStatus) DeepCopyInto(out *ClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EthereumAddress ¶
type EthereumAddress string
EthereumAddress is ethereum address +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]{40}$"
type Genesis ¶
type Genesis struct { // Accounts is array of accounts to fund or associate with code and storage Accounts []Account `json:"accounts,omitempty"` // NetworkID is network id NetworkID uint `json:"networkId"` // ChainID is the the chain ID used in transaction signature to prevent reply attack // more details https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md ChainID uint `json:"chainId"` QBFT QBFT `json:"qbft,omitempty"` }
Genesis is genesis block sepcficition
func (*Genesis) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Genesis.
func (*Genesis) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Hash ¶
type Hash string
Hash is KECCAK-256 hash +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]{64}$"
type HexString ¶
type HexString string
HexString is String in hexadecial format +kubebuilder:validation:Pattern="^0[xX][0-9a-fA-F]+$"
type Node ¶
type Node struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec NodeSpec `json:"spec,omitempty"` Status NodeStatus `json:"status,omitempty"` }
Node is the Schema for the nodes API
func (*Node) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Node.
func (*Node) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Node) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Node) Default ¶
func (r *Node) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Node) DefaultNodePorts ¶
func (r *Node) DefaultNodePorts()
func (*Node) DefaultNodeResources ¶
func (r *Node) DefaultNodeResources()
func (*Node) SetupWebhookWithManager ¶
func (*Node) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*Node) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
type NodeList ¶
type NodeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Node `json:"items"` }
NodeList contains a list of Node
func (*NodeList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList.
func (*NodeList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NodeList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type NodeSpec ¶
type NodeSpec struct { // Image is Ethereum node client image Image string `json:"image,omitempty"` // Resources is node compute and storage resources shared.Resources `json:"resources,omitempty"` // StaticNodes is a set of ethereum nodes to maintain connection to // +listType=set StaticNodes []Enode `json:"staticNodes,omitempty"` // Genesis is genesis block configuration Genesis *Genesis `json:"genesis,omitempty"` // NodePrivateKeySecretName is the secret name holding node private key NodePrivateKeySecretName string `json:"nodePrivateKeySecretName,omitempty"` // Miner is whether node is mining/validating blocks or no Miner bool `json:"miner,omitempty"` // Coinbase is the account to which mining rewards are paid Coinbase EthereumAddress `json:"coinbase,omitempty"` // Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3) Verbosity uint `json:"verbosity,omitempty"` Ports `json:"ports,omitempty"` }
NodeSpec defines the desired state of Node
func (*NodeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSpec.
func (*NodeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeStatus ¶
type NodeStatus struct { }
NodeStatus defines the observed state of Node
func (*NodeStatus) DeepCopy ¶
func (in *NodeStatus) DeepCopy() *NodeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeStatus.
func (*NodeStatus) DeepCopyInto ¶
func (in *NodeStatus) DeepCopyInto(out *NodeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NodeTemplate ¶
type NodeTemplate struct { // number of validator Number int `json:"number"` // Resources is node compute and storage resources shared.Resources `json:"resources"` // Logging verbosity: 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail (default: 3) Verbosity uint `json:"verbosity,omitempty"` }
func (*NodeTemplate) DeepCopy ¶
func (in *NodeTemplate) DeepCopy() *NodeTemplate
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeTemplate.
func (*NodeTemplate) DeepCopyInto ¶
func (in *NodeTemplate) DeepCopyInto(out *NodeTemplate)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Ports ¶
type Ports struct { // P2PPort is port used for peer to peer communication P2PPort uint `json:"p2pPort,omitempty"` // RPCPort is HTTP-RPC server listening port RPCPort uint `json:"rpcPort,omitempty"` // WSPort is the web socket server listening port WSPort uint `json:"wsPort,omitempty"` // GraphQLPort is the GraphQL server listening port GraphQLPort uint `json:"graphqlPort,omitempty"` RLPXPort uint `json:"rlpxPort,omitempty"` MetricsPort uint `json:"metricsPort,omitempty"` }
func (*Ports) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Ports.
func (*Ports) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QBFT ¶
type QBFT struct { // Validators are initial ibft2 validators // +kubebuilder:validation:MinItems=1 Validators []EthereumAddress `json:"validators,omitempty"` EpochLength uint64 `json:"epochlength"` // Number of blocks that should pass before pending validator votes are reset BlockPeriodSeconds uint64 `json:"blockperiodseconds"` // Minimum time between two consecutive IBFT or QBFT blocks’ timestamps in seconds RequestTimeoutSeconds uint64 `json:"requesttimeoutseconds"` // Minimum request timeout for each IBFT or QBFT round in milliseconds }
func (*QBFT) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QBFT.
func (*QBFT) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.