Documentation
¶
Index ¶
- Constants
- func ReduceContainerStatuses(statuses []core.ContainerStatus) core.PodPhase
- func ToContainerStatus(name string, props Properties, state core.ContainerState) core.ContainerStatus
- type ID
- type Location
- type Name
- type Properties
- type State
- type Store
- type Unit
- func (u *Unit) Marshal() ([]byte, error)
- func (u *Unit) MarshalUnitSections() []*unit.UnitSection
- func (u *Unit) ToContainer() (ret core.Container)
- func (u *Unit) ToPod(nodeName string, cs []core.Container, status *core.PodStatus) *core.Pod
- func (u *Unit) Unmarshal(data []byte) error
- func (u *Unit) UnmarshalUnitSections(ss []*unit.UnitSection) error
- type View
- type Views
Constants ¶
View Source
const ( ServiceSection = "Service" ExecStartKey = "ExecStart" WorkdirKey = "WorkingDirectory" UserKey = "User" K8sSection = "X-Kubernetes" NamespaceKey = "Namespace" PodKey = "Pod" PodUIDKey = "PodUID" ContainerKey = "Container" )
View Source
const ( Prefix = "unitlet" Suffix = ".service" Sep = "." )
Variables ¶
This section is empty.
Functions ¶
func ReduceContainerStatuses ¶
func ReduceContainerStatuses(statuses []core.ContainerStatus) core.PodPhase
func ToContainerStatus ¶
func ToContainerStatus(name string, props Properties, state core.ContainerState) core.ContainerStatus
Types ¶
type Properties ¶
type State ¶
type State interface { Link(ctx context.Context, loc Location) error Enable(ctx context.Context, name Name) error Disable(ctx context.Context, name Name) error Start(ctx context.Context, name Name) error Stop(ctx context.Context, name Name) error Reload(ctx context.Context) error ResetFailed(ctx context.Context, name Name) error Views(ctx context.Context) (Views, error) Properties(ctx context.Context, name Name) (Properties, error) }
type Unit ¶
func (*Unit) MarshalUnitSections ¶
func (u *Unit) MarshalUnitSections() []*unit.UnitSection
func (*Unit) ToContainer ¶
func (*Unit) UnmarshalUnitSections ¶
func (u *Unit) UnmarshalUnitSections(ss []*unit.UnitSection) error
Click to show internal directories.
Click to hide internal directories.