Documentation ¶
Index ¶
- Constants
- func AddDeviceCrds(scheme *runtime.Scheme) error
- func GetTimeStamp() string
- func NewCRDClient(MasterAdress, KubeConfigPath string) (*rest.RESTClient, error)
- type Device
- func (s *Device) AddDesiredArg(arg string)
- func (s *Device) AddDesiredJob(job string)
- func (s *Device) GetStatus() string
- func (s *Device) InitDevice(id, ns string, crdClient *rest.RESTClient) error
- func (s *Device) Launch(filename, url string)
- func (s *Device) PatchStatus() ([]byte, error)
- func (s *Device) SyncStatus() error
- type K8SConfig
Constants ¶
View Source
const ( // MergePatchType is patch type MergePatchType = "application/merge-patch+json" // ResourceTypeDevices is plural of device resource in apiserver ResourceTypeDevices = "devices" )
Variables ¶
This section is empty.
Functions ¶
func AddDeviceCrds ¶
func GetTimeStamp ¶
func GetTimeStamp() string
func NewCRDClient ¶
func NewCRDClient(MasterAdress, KubeConfigPath string) (*rest.RESTClient, error)
NewCRDClient is used to create a restClient for crd
Types ¶
type Device ¶
type Device struct { Status ke.DeviceStatus `json:"status"` DeviceID string `json:"-"` Namespace string `json:"-"` FSM *fsm.FSM `json:"-"` Filename string Url string // contains filtered or unexported fields }
func (*Device) AddDesiredArg ¶
func (*Device) AddDesiredJob ¶
func (*Device) InitDevice ¶
func (s *Device) InitDevice(id, ns string, crdClient *rest.RESTClient) error
func (*Device) PatchStatus ¶
func (*Device) SyncStatus ¶
Click to show internal directories.
Click to hide internal directories.