Documentation ¶
Index ¶
- func FormatError(cmd *exec.Cmd, stdout []byte, err error) error
- type Action
- type Attributes
- type DockerComposeClient
- type Event
- type FakeDCClient
- func (c *FakeDCClient) Config(_ context.Context, _ []string) (string, error)
- func (c *FakeDCClient) ContainerID(ctx context.Context, spec model.DockerComposeUpSpec) (container.ID, error)
- func (c *FakeDCClient) Down(ctx context.Context, p model.DockerComposeProject, stdout, stderr io.Writer) error
- func (c *FakeDCClient) Project(_ context.Context, configPaths []string) (*model.DockerComposeProject, *types.Project, error)
- func (c *FakeDCClient) SendEvent(evt Event) error
- func (c *FakeDCClient) StreamEvents(ctx context.Context, p model.DockerComposeProject) (<-chan string, error)
- func (c *FakeDCClient) StreamLogs(ctx context.Context, spec model.DockerComposeUpSpec) io.ReadCloser
- func (c *FakeDCClient) Up(ctx context.Context, spec model.DockerComposeUpSpec, shouldBuild bool, ...) error
- func (c *FakeDCClient) Version(_ context.Context) (string, string, error)
- type State
- func (s State) HasEverBeenReadyOrSucceeded() bool
- func (State) RuntimeState()
- func (s State) RuntimeStatus() v1alpha1.RuntimeStatus
- func (s State) RuntimeStatusError() error
- func (s State) WithContainerID(cID container.ID) State
- func (s State) WithContainerState(state types.ContainerState) State
- func (s State) WithLastReadyTime(time time.Time) State
- func (s State) WithPorts(ports nat.PortMap) State
- func (s State) WithSpanID(spanID model.LogSpanID) State
- func (s State) WithStartTime(time time.Time) State
- type Type
- type UpCall
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action int
const ( // CONTAINER actions ActionUnknown Action = iota ActionAttach ActionCommit ActionCopy ActionCreate ActionDestroy ActionDie ActionExecCreate ActionExecDetach ActionExecDie ActionExecStart ActionExport ActionHealthStatus ActionKill ActionOom ActionPause ActionRename ActionResize ActionRestart ActionStart ActionStop ActionTop ActionUnpause ActionUpdate )
func (Action) MarshalJSON ¶ added in v0.4.3
func (*Action) UnmarshalJSON ¶
type Attributes ¶
type DockerComposeClient ¶
type DockerComposeClient interface { Up(ctx context.Context, spec model.DockerComposeUpSpec, shouldBuild bool, stdout, stderr io.Writer) error Down(ctx context.Context, spec model.DockerComposeProject, stdout, stderr io.Writer) error StreamLogs(ctx context.Context, spec model.DockerComposeUpSpec) io.ReadCloser StreamEvents(ctx context.Context, spec model.DockerComposeProject) (<-chan string, error) Project(ctx context.Context, configPaths []string) (*model.DockerComposeProject, *types.Project, error) ContainerID(ctx context.Context, spec model.DockerComposeUpSpec) (container.ID, error) Version(ctx context.Context) (canonicalVersion string, build string, err error) }
func NewDockerComposeClient ¶
func NewDockerComposeClient(env docker.LocalEnv) DockerComposeClient
TODO(dmiller): we might want to make this take a path to the docker-compose config so we don't have to keep passing it in.
type Event ¶
type Event struct { Time string `json:"time"` // todo: time Type Type `json:"type"` Action Action `json:"action"` ID string `json:"id"` // todo: type? Service string `json:"service"` Attributes Attributes `json:"attributes"` }
func EventFromJsonStr ¶
func (Event) IsStartupEvent ¶ added in v0.4.2
type FakeDCClient ¶
type FakeDCClient struct { RunLogOutput map[string]<-chan string ContainerIdOutput container.ID ConfigOutput string VersionOutput string UpCalls []UpCall DownError error WorkDir string // contains filtered or unexported fields }
func NewFakeDockerComposeClient ¶
func NewFakeDockerComposeClient(t *testing.T, ctx context.Context) *FakeDCClient
func (*FakeDCClient) ContainerID ¶ added in v0.5.1
func (c *FakeDCClient) ContainerID(ctx context.Context, spec model.DockerComposeUpSpec) (container.ID, error)
func (*FakeDCClient) Down ¶
func (c *FakeDCClient) Down(ctx context.Context, p model.DockerComposeProject, stdout, stderr io.Writer) error
func (*FakeDCClient) Project ¶ added in v0.22.1
func (c *FakeDCClient) Project(_ context.Context, configPaths []string) (*model.DockerComposeProject, *types.Project, error)
func (*FakeDCClient) SendEvent ¶
func (c *FakeDCClient) SendEvent(evt Event) error
func (*FakeDCClient) StreamEvents ¶
func (c *FakeDCClient) StreamEvents(ctx context.Context, p model.DockerComposeProject) (<-chan string, error)
func (*FakeDCClient) StreamLogs ¶
func (c *FakeDCClient) StreamLogs(ctx context.Context, spec model.DockerComposeUpSpec) io.ReadCloser
type State ¶
type State struct { ContainerState types.ContainerState ContainerID container.ID // TODO(nick): It might make since to get rid of StartTime // and parse it out of the ContainerState.StartedAt string, // though we would have to decide how to treat containers // started before Tilt start. StartTime time.Time LastReadyTime time.Time SpanID model.LogSpanID Ports nat.PortMap }
func (State) HasEverBeenReadyOrSucceeded ¶ added in v0.14.0
func (State) RuntimeState ¶ added in v0.10.5
func (State) RuntimeState()
func (State) RuntimeStatus ¶ added in v0.14.0
func (s State) RuntimeStatus() v1alpha1.RuntimeStatus
func (State) RuntimeStatusError ¶ added in v0.14.0
func (State) WithContainerID ¶ added in v0.5.0
func (State) WithContainerState ¶ added in v0.14.0
func (s State) WithContainerState(state types.ContainerState) State
func (State) WithLastReadyTime ¶ added in v0.10.15
type Type ¶
type Type int
https://docs.docker.com/engine/reference/commandline/events/
func (Type) MarshalJSON ¶ added in v0.4.3
func (*Type) UnmarshalJSON ¶
type UpCall ¶ added in v0.6.0
type UpCall struct { Spec model.DockerComposeUpSpec ShouldBuild bool }
Represents a single call to Up
Click to show internal directories.
Click to hide internal directories.