func NewContainer(id uid.UID) *Handle { con := &Container{ ExecConfig: &executor.ExecutorConfig{}, State: StateStopped, } con.ExecConfig.ID = id.String() return con.newHandle() }
func GetContainer(ctx context.Context, id uid.UID) *Handle { // get from the cache container := Containers.Container(id.String()) if container != nil { return container.NewHandle(ctx) } return nil }
func GetContainer(id uid.UID) *Handle { // get from the cache container := containers.Container(id.String()) if container != nil { return container.newHandle() } return nil }
func NewContainer(id uid.UID) *Handle { con := &Container{ ContainerInfo: ContainerInfo{ state: StateCreating, }, newStateEvents: make(map[State]chan struct{}), } h := newHandle(con) h.ExecConfig.ID = id.String() return h }