Documentation ¶
Index ¶
- func PodMaker(spec api.PodSpec) []pod.PodRecipe
- type PodService
- func (p *PodService) AddPod(newPod pod.PodRecipe)
- func (p *PodService) CheckAllPodsStatus()
- func (p *PodService) CreatePod(spec pod.PodRecipe) error
- func (p *PodService) DeleteAllPods() error
- func (p *PodService) DeletePodById(id string) error
- func (p *PodService) DeletePodBySelector(spec pod.PodRecipe) error
- func (p *PodService) DeletePodsBySelector(selector string, count uint) error
- func (p *PodService) GetAllContainers() ([]types.Container, error)
- func (p *PodService) GetAllPods() []*pod.Pod
- func (p *PodService) GetContainer(id string) (*types.ContainerJSON, error)
- func (p *PodService) GetFirstPodWithSelector(selector string) *pod.Pod
- func (p *PodService) GetPodById(id string) *pod.Pod
- func (p *PodService) GetPodByName(name string) *pod.Pod
- func (p *PodService) GetPodIndex(pod *pod.Pod) int
- func (p *PodService) GetPodsBySelector(selector string) []*pod.Pod
- func (p *PodService) GetPodsStatusBySelector(selector string) uint
- func (p *PodService) ListPodLogsByID(id string) (io.ReadCloser, error)
- func (p *PodService) PodSink()
- func (p *PodService) PodSource(spec api.PodSpec) error
- func (p *PodService) RemovePodByID(id string) error
- func (p *PodService) RunAllPods() error
- func (p *PodService) RunPodBySelector(selector string) error
- func (p *PodService) StopPodByID(id string) error
- func (p *PodService) StopPodBySelector(selector string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PodService ¶
type PodService struct {
// contains filtered or unexported fields
}
func NewPodService ¶
func NewPodService() (*PodService, error)
func (*PodService) AddPod ¶
func (p *PodService) AddPod(newPod pod.PodRecipe)
This will add one pod to the pipeline
func (*PodService) CheckAllPodsStatus ¶
func (p *PodService) CheckAllPodsStatus()
Checks the status of all the pods When some pod status changes from running to stop we ping the deployment controller about the same and then we remove that pod from our list the deployment controller will then send a new request to create a new pod NOTE: This function might cause lots of issues without a mutex find out why its crashing on addition of mutex and fix this on priority basis
func (*PodService) CreatePod ¶
func (p *PodService) CreatePod(spec pod.PodRecipe) error
Create Pod from PodRecipe This function is called from the PodSink() function of the pipeline
func (*PodService) DeletePodById ¶
func (p *PodService) DeletePodById(id string) error
Delete Pod by ID NOTE: Removal from pod list yet to be imolement
func (*PodService) DeletePodBySelector ¶
func (p *PodService) DeletePodBySelector(spec pod.PodRecipe) error
func (*PodService) DeletePodsBySelector ¶
func (p *PodService) DeletePodsBySelector(selector string, count uint) error
Delete specified number of pods by selector
func (*PodService) GetAllContainers ¶
func (p *PodService) GetAllContainers() ([]types.Container, error)
Gets all the docker containers, running or not running
func (*PodService) GetAllPods ¶
func (p *PodService) GetAllPods() []*pod.Pod
Get All Pods in service
func (*PodService) GetContainer ¶
func (p *PodService) GetContainer(id string) (*types.ContainerJSON, error)
Get Container By ID
func (*PodService) GetFirstPodWithSelector ¶
func (p *PodService) GetFirstPodWithSelector(selector string) *pod.Pod
Gets the first pod in the pod list with given selector
func (*PodService) GetPodByName ¶
func (p *PodService) GetPodByName(name string) *pod.Pod
Get Pod by Name
func (*PodService) GetPodIndex ¶
func (p *PodService) GetPodIndex(pod *pod.Pod) int
func (*PodService) GetPodsBySelector ¶
func (p *PodService) GetPodsBySelector(selector string) []*pod.Pod
Get Pods by Selector
func (*PodService) GetPodsStatusBySelector ¶
func (p *PodService) GetPodsStatusBySelector(selector string) uint
func (*PodService) ListPodLogsByID ¶
func (p *PodService) ListPodLogsByID(id string) (io.ReadCloser, error)
List logs of pod by ID
func (*PodService) PodSink ¶
func (p *PodService) PodSink()
This will act like a sink/consumer for our pipeline of pod creation Instead of a queue, we use a channel that acts like a queue
func (*PodService) PodSource ¶
func (p *PodService) PodSource(spec api.PodSpec) error
Acts as source for pod
func (*PodService) RemovePodByID ¶
func (p *PodService) RemovePodByID(id string) error
Remove Pod by ID
func (*PodService) RunPodBySelector ¶
func (p *PodService) RunPodBySelector(selector string) error
Run Pod by Selector
func (*PodService) StopPodBySelector ¶
func (p *PodService) StopPodBySelector(selector string) error
Stop Pod By Selector Name