mirror of https://github.com/k3s-io/k3s
kubelet/api: extract RuntimeVersioner interface
parent
89b4598ab7
commit
cfc08dea34
|
@ -22,11 +22,17 @@ import (
|
||||||
runtimeApi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
runtimeApi "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// RuntimeVersioner contains methods for runtime name, version and API version.
|
||||||
|
type RuntimeVersioner interface {
|
||||||
|
// Version returns the runtime name, runtime version and runtime API version
|
||||||
|
Version(apiVersion string) (*runtimeApi.VersionResponse, error)
|
||||||
|
}
|
||||||
|
|
||||||
// RuntimeService interface should be implemented by a container runtime.
|
// RuntimeService interface should be implemented by a container runtime.
|
||||||
// The methods should be thread-safe.
|
// The methods should be thread-safe.
|
||||||
type RuntimeService interface {
|
type RuntimeService interface {
|
||||||
// Version returns the runtime name, runtime version and runtime API version
|
RuntimeVersioner
|
||||||
Version(apiVersion string) (*runtimeApi.VersionResponse, error)
|
|
||||||
// CreatePodSandbox creates a pod-level sandbox.
|
// CreatePodSandbox creates a pod-level sandbox.
|
||||||
// The definition of PodSandbox is at https://github.com/kubernetes/kubernetes/pull/25899
|
// The definition of PodSandbox is at https://github.com/kubernetes/kubernetes/pull/25899
|
||||||
CreatePodSandbox(config *runtimeApi.PodSandboxConfig) (string, error)
|
CreatePodSandbox(config *runtimeApi.PodSandboxConfig) (string, error)
|
||||||
|
|
Loading…
Reference in New Issue