Documentation
¶
Index ¶
- type AttachHooks
- type AttachIO
- type Client
- type DirectClient
- func (c *DirectClient) Attach(containerID string, attachIO AttachIO, hooks ...AttachHooks) (err error)
- func (c *DirectClient) CreatePod(status chan<- []*progress.ImageFetch, pod *pods.Pod, opts ...PodOpts) error
- func (c *DirectClient) DeletePod(pod *pods.Pod) (*pods.Pod, error)
- func (c *DirectClient) GetPod(podName string) (*pods.Pod, error)
- func (c *DirectClient) GetPods() ([]*pods.Pod, error)
- func (c *DirectClient) Signal(containerID string, signal syscall.Signal) (err error)
- func (c *DirectClient) StartPod(name string) (*pods.Pod, error)
- type MultiDirectClient
- func (c *MultiDirectClient) Attach(containerID string, attachIO AttachIO, hooks ...AttachHooks) (err error)
- func (c *MultiDirectClient) CreatePod(updates chan<- []*progress.ImageFetch, pod *pods.Pod, opts ...PodOpts) error
- func (c *MultiDirectClient) DeletePod(pod *pods.Pod) (*pods.Pod, error)
- func (c *MultiDirectClient) GetPod(podName string) (*pods.Pod, error)
- func (c *MultiDirectClient) GetPods() (result []*pods.Pod, err error)
- func (c *MultiDirectClient) Signal(containerID string, signal syscall.Signal) (err error)
- func (c *MultiDirectClient) StartPod(name string) (*pods.Pod, error)
- type PodOpts
- type Server
- func (s *Server) Attach(server containers.Containers_AttachServer) error
- func (s *Server) Create(req *pods.CreatePodRequest, server pods.Pods_CreateServer) error
- func (s *Server) Delete(context context.Context, req *pods.DeletePodRequest) (*pods.DeletePodResponse, error)
- func (s *Server) List(context context.Context, req *pods.ListPodsRequest) (*pods.ListPodsResponse, error)
- func (s *Server) Serve() error
- func (s *Server) Signal(cxt context.Context, req *containers.SignalRequest) (*containers.SignalResponse, error)
- func (s *Server) Start(context context.Context, req *pods.StartPodRequest) (*pods.StartPodResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachHooks ¶
AttachHooks is additional process what runs when is attached to container
type Client ¶
type Client interface {
GetPods() ([]*pods.Pod, error)
GetPod(podName string) (*pods.Pod, error)
CreatePod(status chan<- []*progress.ImageFetch, pod *pods.Pod, opts ...PodOpts) error
StartPod(name string) (*pods.Pod, error)
DeletePod(pod *pods.Pod) (*pods.Pod, error)
Attach(containerID string, attachIO AttachIO, hooks ...AttachHooks) (err error)
Signal(containerID string, signal syscall.Signal) (err error)
}
Client interface for all API clients
type DirectClient ¶
type DirectClient struct {
Namespace string
Endpoint config.Endpoint
// contains filtered or unexported fields
}
DirectClient connects directly to device RPC API
func NewDirectClient ¶
func NewDirectClient(namespace string, endpoint config.Endpoint) *DirectClient
NewDirectClient creates new RPC server client
func (*DirectClient) Attach ¶
func (c *DirectClient) Attach(containerID string, attachIO AttachIO, hooks ...AttachHooks) (err error)
Attach calls server and fetches pod logs
func (*DirectClient) CreatePod ¶
func (c *DirectClient) CreatePod(status chan<- []*progress.ImageFetch, pod *pods.Pod, opts ...PodOpts) error
CreatePod creates new pod to the target server
func (*DirectClient) GetPod ¶
func (c *DirectClient) GetPod(podName string) (*pods.Pod, error)
GetPod return Pod by name
func (*DirectClient) GetPods ¶
func (c *DirectClient) GetPods() ([]*pods.Pod, error)
GetPods calls server and fetches all pods information
type MultiDirectClient ¶
type MultiDirectClient struct {
Namespace string
// contains filtered or unexported fields
}
MultiDirectClient connects directly to multiples devices RPC API
func NewMultiDirectClient ¶
func NewMultiDirectClient(namespace string, endpoints []config.Endpoint) *MultiDirectClient
NewMultiDirectClient creates new client which connects to multiple RPC APIs
func (*MultiDirectClient) Attach ¶
func (c *MultiDirectClient) Attach(containerID string, attachIO AttachIO, hooks ...AttachHooks) (err error)
Attach will return error, because attaching to multiple devices is not yet supported
func (*MultiDirectClient) CreatePod ¶
func (c *MultiDirectClient) CreatePod(updates chan<- []*progress.ImageFetch, pod *pods.Pod, opts ...PodOpts) error
CreatePod will return error, because creating pod to multiple devices is not yet supported
func (*MultiDirectClient) DeletePod ¶
DeletePod will return error, because deleting pod in multiple devices is not yet supported
func (*MultiDirectClient) GetPod ¶
func (c *MultiDirectClient) GetPod(podName string) (*pods.Pod, error)
GetPod will return error, because getting pod from multiple devices is not yet supported
func (*MultiDirectClient) GetPods ¶
func (c *MultiDirectClient) GetPods() (result []*pods.Pod, err error)
GetPods calls each device and fetches all pods information
type PodOpts ¶
PodOpts adds more information to the Pod going to be created
func WithContainer ¶
func WithContainer(container *containers.Container) PodOpts
WithContainer adds container to the Pod spec
func WithSharedMount ¶
func WithSharedMount(mount *containers.Mount) PodOpts
WithSharedMount adds mount point to each container
func WithWorkingDir ¶
WithWorkingDir sets each container workdir If workdir is already defined, will return error
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements the GRPC API for the eli
func (*Server) Attach ¶
func (s *Server) Attach(server containers.Containers_AttachServer) error
Attach connects to process in container and streams stdout and stderr outputs to client
func (*Server) Create ¶
func (s *Server) Create(req *pods.CreatePodRequest, server pods.Pods_CreateServer) error
Create is 'pods' service Create implementation
func (*Server) Delete ¶
func (s *Server) Delete(context context.Context, req *pods.DeletePodRequest) (*pods.DeletePodResponse, error)
Delete is 'pods' service Delete implementation
func (*Server) List ¶
func (s *Server) List(context context.Context, req *pods.ListPodsRequest) (*pods.ListPodsResponse, error)
List is 'pods' service List implementation
func (*Server) Signal ¶
func (s *Server) Signal(cxt context.Context, req *containers.SignalRequest) (*containers.SignalResponse, error)
Signal connects to process in container and send signal to the process
func (*Server) Start ¶
func (s *Server) Start(context context.Context, req *pods.StartPodRequest) (*pods.StartPodResponse, error)
Start is 'pods' service Start implementation
Directories
¶
| Path | Synopsis |
|---|---|
|
Package core is a generated protocol buffer package.
|
Package core is a generated protocol buffer package. |
|
services
|
|
|
containers/v1
Package containers is a generated protocol buffer package.
|
Package containers is a generated protocol buffer package. |
|
pods/v1
Package pods is a generated protocol buffer package.
|
Package pods is a generated protocol buffer package. |