Documentation
¶
Index ¶
- type Bid
- type BidId
- type BidPrice
- type BidWrapper
- type Bids
- type BidsSliceWrapper
- type Deployment
- type DeploymentCreateRequest
- type DeploymentId
- type DeploymentInfo
- type DeploymentResponse
- type EscrowAccount
- type EscrowAccountBalance
- type Provider
- type SDL
- type SDLComputeProfile
- type SDLDeploymentGroup
- type SDLExposeSpec
- type SDLExposeTo
- type SDLPlacementProfile
- type SDLPricing
- type SDLProfiles
- type SDLResourceCPU
- type SDLResourceMemory
- type SDLResourceStorage
- type SDLResources
- type SDLService
- type SDLSignedBy
- type SDLStorage
- type Seqs
- type Transaction
- type TransactionEvent
- type TransactionEventAttribute
- type TransactionEventAttributes
- type TransactionLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BidWrapper ¶
type BidWrapper struct {
Bid Bid `json:"bid"`
}
type Bids ¶
type Bids []Bid
func (Bids) FilterByMaxPrice ¶
FilterByMaxPrice filters bids that are at or below the maximum price (in the same denomination)
func (Bids) FindAllByProviders ¶
FindAllByProviders finds all the Bid structures that have any of the given providers. It returns a slice of all the Bid structures where the providers were found.
func (Bids) FindByProvider ¶
func (Bids) GetLowestPriceBid ¶
GetLowestPriceBid returns the bid with the lowest price from a list of bids
func (Bids) GetProviderAddresses ¶
type BidsSliceWrapper ¶
type BidsSliceWrapper struct {
BidWrappers []BidWrapper `json:"bids"`
}
type Deployment ¶
type Deployment struct {
DeploymentInfo DeploymentInfo `json:"deployment"`
EscrowAccount EscrowAccount `json:"escrow_account"`
}
type DeploymentCreateRequest ¶
type DeploymentId ¶
type DeploymentInfo ¶
type DeploymentInfo struct {
State string `json:"state"`
DeploymentId DeploymentId `json:"deployment_id"`
Hash string `json:"hash,omitempty"` // SDL hash from deployment
CreatedAt int64 `json:"created_at,omitempty"` // Block height when deployment was created
}
type DeploymentResponse ¶
type DeploymentResponse struct {
Deployments []Deployment `json:"deployments"`
}
type EscrowAccount ¶
type EscrowAccount struct {
Owner string `json:"owner"`
State string `json:"state"`
Balance EscrowAccountBalance `json:"balance"`
}
type EscrowAccountBalance ¶
type SDL ¶
type SDL struct {
Version string `yaml:"version"`
Services map[string]SDLService `yaml:"services"`
Profiles SDLProfiles `yaml:"profiles"`
Deployment map[string]SDLDeploymentGroup `yaml:"deployment"`
}
SDL represents the root structure of an Akash deployment manifest
type SDLComputeProfile ¶
type SDLComputeProfile struct {
Resources SDLResources `yaml:"resources"`
}
SDLComputeProfile defines the computational resources for a profile
type SDLDeploymentGroup ¶
SDLDeploymentGroup defines the deployment configuration for a service
type SDLExposeSpec ¶
type SDLExposeSpec struct {
Port int `yaml:"port"`
As int `yaml:"as,omitempty"`
Accept []string `yaml:"accept,omitempty"`
To []SDLExposeTo `yaml:"to,omitempty"`
Proto string `yaml:"proto,omitempty"`
}
SDLExposeSpec defines how a service port should be exposed
type SDLExposeTo ¶
type SDLExposeTo struct {
Global bool `yaml:"global,omitempty"`
}
SDLExposeTo defines the exposure scope for a port
type SDLPlacementProfile ¶
type SDLPlacementProfile struct {
Attributes map[string]interface{} `yaml:"attributes,omitempty"`
SignedBy SDLSignedBy `yaml:"signedBy,omitempty"`
Pricing map[string]SDLPricing `yaml:"pricing"`
}
SDLPlacementProfile defines placement constraints and pricing
type SDLPricing ¶
type SDLPricing struct {
Amount int64 `yaml:"amount"`
}
SDLPricing defines pricing information for a service. Denom is fixed to uact under node v2 BME and is not part of the SDL spec.
type SDLProfiles ¶
type SDLProfiles struct {
Compute map[string]SDLComputeProfile `yaml:"compute"`
Placement map[string]SDLPlacementProfile `yaml:"placement"`
}
SDLProfiles contains compute and placement profiles
type SDLResourceCPU ¶
type SDLResourceCPU struct {
Units string `yaml:"units"`
}
SDLResourceCPU defines CPU resource requirements
func (*SDLResourceCPU) UnmarshalYAML ¶
func (c *SDLResourceCPU) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements custom YAML unmarshaling for CPU resources
type SDLResourceMemory ¶
type SDLResourceMemory struct {
Size string `yaml:"size"`
}
SDLResourceMemory defines memory resource requirements
func (*SDLResourceMemory) UnmarshalYAML ¶
func (m *SDLResourceMemory) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements custom YAML unmarshaling for memory resources
type SDLResourceStorage ¶
SDLResourceStorage defines storage resource requirements
func (*SDLResourceStorage) UnmarshalYAML ¶
func (s *SDLResourceStorage) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements custom YAML unmarshaling for storage resources
type SDLResources ¶
type SDLResources struct {
CPU SDLResourceCPU `yaml:"cpu"`
Memory SDLResourceMemory `yaml:"memory"`
Storage SDLResourceStorage `yaml:"storage,omitempty"`
}
SDLResources defines the resource requirements
type SDLService ¶
type SDLService struct {
Image string `yaml:"image"`
Command []string `yaml:"command,omitempty"`
Args []string `yaml:"args,omitempty"`
Env []string `yaml:"env,omitempty"`
Expose []SDLExposeSpec `yaml:"expose,omitempty"`
}
SDLService defines a service within the SDL
type SDLSignedBy ¶
type SDLSignedBy struct {
AnyOf []string `yaml:"anyOf,omitempty"`
AllOf []string `yaml:"allOf,omitempty"`
}
SDLSignedBy defines signing requirements for placement
type SDLStorage ¶
type SDLStorage struct {
Name string `yaml:"name,omitempty"`
Size string `yaml:"size"`
Class string `yaml:"class,omitempty"`
}
SDLStorage defines storage requirements
type Transaction ¶
type Transaction struct {
Height string `json:"height"`
Logs []TransactionLog `json:"logs"`
RawLog string `json:"raw_log"`
}
type TransactionEvent ¶
type TransactionEvent struct {
Type string `json:"type"`
Attributes TransactionEventAttributes `json:"attributes"`
}
type TransactionEventAttributes ¶
type TransactionEventAttributes []TransactionEventAttribute
type TransactionLog ¶
type TransactionLog struct {
Events []TransactionEvent `json:"events"`
}