Remove deprecated funcs from restart package
Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
parent
653b808992
commit
5ca56ddbb4
@ -38,7 +38,6 @@ import (
|
|||||||
|
|
||||||
containerd "github.com/containerd/containerd/v2/client"
|
containerd "github.com/containerd/containerd/v2/client"
|
||||||
"github.com/containerd/containerd/v2/core/containers"
|
"github.com/containerd/containerd/v2/core/containers"
|
||||||
"github.com/containerd/containerd/v2/pkg/cio"
|
|
||||||
"github.com/containerd/log"
|
"github.com/containerd/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -157,32 +156,6 @@ func WithLogURIString(uriString string) func(context.Context, *containerd.Client
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WithBinaryLogURI sets the binary-type log uri for a container.
|
|
||||||
//
|
|
||||||
// Deprecated(in release 1.5): use WithLogURI
|
|
||||||
func WithBinaryLogURI(binary string, args map[string]string) func(context.Context, *containerd.Client, *containers.Container) error {
|
|
||||||
uri, err := cio.LogURIGenerator("binary", binary, args)
|
|
||||||
if err != nil {
|
|
||||||
return func(context.Context, *containerd.Client, *containers.Container) error {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return WithLogURI(uri)
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithFileLogURI sets the file-type log uri for a container.
|
|
||||||
//
|
|
||||||
// Deprecated(in release 1.5): use WithLogURI
|
|
||||||
func WithFileLogURI(path string) func(context.Context, *containerd.Client, *containers.Container) error {
|
|
||||||
uri, err := cio.LogURIGenerator("file", path, nil)
|
|
||||||
if err != nil {
|
|
||||||
return func(context.Context, *containerd.Client, *containers.Container) error {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return WithLogURI(uri)
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithStatus sets the status for a container
|
// WithStatus sets the status for a container
|
||||||
func WithStatus(status containerd.ProcessStatus) func(context.Context, *containerd.Client, *containers.Container) error {
|
func WithStatus(status containerd.ProcessStatus) func(context.Context, *containerd.Client, *containers.Container) error {
|
||||||
return func(_ context.Context, _ *containerd.Client, c *containers.Container) error {
|
return func(_ context.Context, _ *containerd.Client, c *containers.Container) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user