Documentation ¶
Overview ¶
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021 NAME HERE <EMAIL ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByLastPushedDesc ¶
type ByLastPushedDesc []Image
func (ByLastPushedDesc) Len ¶
func (i ByLastPushedDesc) Len() int
Len - implement sort.Interface for ByLastPushedDesc
func (ByLastPushedDesc) Less ¶
func (i ByLastPushedDesc) Less(a int, b int) bool
Less - implement sort.Interface for ByLastPushedDesc
func (ByLastPushedDesc) Swap ¶
func (i ByLastPushedDesc) Swap(a int, b int)
Swap - implement sort.Interface for ByLastPushedDesc
type Cake ¶
type Cake struct { sync.Mutex Repo string Tag string Registry string DockerClient *dockerClient.Client PreviousDigest string PreviousDigestTime time.Time LatestDigest string LatestDigestTime time.Time LastChecked time.Time LastUpdated time.Time ContainersRunning map[string]int StopTimeout time.Duration }
func (*Cake) GetLatestDigest ¶
func (*Cake) IsLatestDigestPulled ¶
func (*Cake) IsLatestDigestRunning ¶
func (*Cake) PullLatestDigest ¶
func (c *Cake) PullLatestDigest()
func (*Cake) RunLatestDigest ¶
func (c *Cake) RunLatestDigest()
func (*Cake) Stop ¶
func (c *Cake) Stop()
Stop - stop this instance of cake and perform some clean up
func (*Cake) StopPreviousDigest ¶
func (c *Cake) StopPreviousDigest()
type ErrorCode ¶
type ErrorCode struct {
// contains filtered or unexported fields
}
ErrCakeNotFound - thrown when a call to a cake instance is required but is not found
ErrCreateContainer - thrown when creating container
ErrGettingRepoTags - thrown when connection to repo is disrupted
ErrJsonDecode - thrown when error decoding JSON
ErrNoRegistry - an error used to specify if no registry is defined when running cake
ErrReadingRepoTags - thrown when repo response could not be read
type Image ¶
type Image struct { Architecture string `json:"architecture"` Features string `json:"features"` Variant string `json:"variant"` Digest string `json:"digest"` OS string `json:"os"` OSFeature string `json:"os_feature"` OSVersion string `json:"os_version"` Size int `json:"size"` Status string `json:"status"` LastPulled time.Time `json:"last_pulled"` LastPushed time.Time `json:"last_pushed"` }
type ImageDetails ¶
type ImageDetails struct { Creator int `json:"creator"` ID int `json:"id"` ImageID string `json:"image_id"` Images []Image `json:"images"` LastUpdated time.Time `json:"last_updated"` LastUpdater int `json:"last_updater"` LastUpdaterUsername string `json:"last_updater_username"` Name string `json:"name"` Repository int `json:"repository"` FullSize int `json:"full_size"` V2 bool `json:"v2"` TagStatus string `json:"tag_status"` TagLastPulled time.Time `json:"tag_last_pulled"` TagLastPushed time.Time `json:"tag_last_pushed"` }