Documentation ¶
Index ¶
Constants ¶
View Source
const (
COMP_UPDATER = "updater"
)
names of known components
Variables ¶
This section is empty.
Functions ¶
func DecodeMani ¶
func EncodeManifest ¶
Types ¶
type AssetManifest ¶
type AssetManifest struct { // url.String() Url string `json:"url"` }
Information to get update manifest
func DecodeAsset ¶
func DecodeAsset(data string) (*AssetManifest, error)
func (*AssetManifest) Decode ¶
func (self *AssetManifest) Decode(data string) error
func (*AssetManifest) Encode ¶
func (self *AssetManifest) Encode() (string, error)
type Component ¶
type Component struct { Version string `json:"version"` Name string `json:"name"` Registry string `json:"registry"` ImageName string `json:"image_name"` ImageTag string `json:"image_tag"` ContainerConfig container.Config `json:"container_config,omitempty"` HostConfig container.HostConfig `json:"host_config,omitempty"` NetConfig network.NetworkingConfig `json:"net_config,omitempty"` ContainerName string `json:"container_name"` Op UpdateOp `json:"op,omitempty"` Force bool `json:"force,omitempty"` Cred string `json:"cred,omitempty"` }
Component definition, including informantion like what to run and how to run
type Credential ¶
Credential required to get update materials
func GetCred ¶
func GetCred(cred_str string) (*Credential, error)
type SubManifest ¶
type SubManifest struct { Uri string `json:"uri"` Cred Credential `json:"cred,omitempty"` Queues map[string]string `json:"queues,omitempty"` Topics map[string]string `json:"topics,omitempty"` }
Subscription manifest
func DecodeSub ¶
func DecodeSub(data string) (*SubManifest, error)
func LoadSubMani ¶
func LoadSubMani() (*SubManifest, error)
func (*SubManifest) Decode ¶
func (self *SubManifest) Decode(data string) error
func (*SubManifest) Encode ¶
func (self *SubManifest) Encode() (string, error)
type UpdateManifest ¶
type UpdateManifest struct { Signature string `json:"signature,omitempty"` Digest string `json:"digest,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` Components []Component `json:"components"` }
Component details for update
func DecodeFromFile ¶
func DecodeFromFile(mani_path string) (*UpdateManifest, error)
func FetchUpdateMani ¶
func FetchUpdateMani(target string) (*UpdateManifest, error)
func (*UpdateManifest) Decode ¶
func (self *UpdateManifest) Decode(data string) error
func (*UpdateManifest) Encode ¶
func (self *UpdateManifest) Encode() (string, error)
func (*UpdateManifest) Generate ¶
func (self *UpdateManifest) Generate(out_path string) error
Click to show internal directories.
Click to hide internal directories.