convert

package
v25.0.15+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: Apache-2.0 Imports: 22 Imported by: 182 modules, 513 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrUnsupportedRuntime returns an error if the runtime is not supported by the daemon
	ErrUnsupportedRuntime = errors.New("unsupported runtime")
	// ErrMismatchedRuntime returns an error if the runtime does not match the provided spec
	ErrMismatchedRuntime = errors.New("mismatched Runtime and *Spec fields")
)

Functions

func BasicNetworkCreateToGRPC

func BasicNetworkCreateToGRPC(create basictypes.NetworkCreateRequest) swarmapi.NetworkSpec

BasicNetworkCreateToGRPC converts a NetworkCreateRequest to a grpc NetworkSpec.

func BasicNetworkFromGRPC

func BasicNetworkFromGRPC(n swarmapi.Network) basictypes.NetworkResource

BasicNetworkFromGRPC converts a grpc Network to a NetworkResource.

func ConfigFromGRPC

func ConfigFromGRPC(s *swarmapi.Config) swarmtypes.Config

ConfigFromGRPC converts a grpc Config to a Config.

func ConfigReferencesFromGRPC

func ConfigReferencesFromGRPC(s []*swarmapi.ConfigReference) []*swarmtypes.ConfigReference

ConfigReferencesFromGRPC converts a slice of grpc ConfigReference to ConfigReference

func ConfigSpecToGRPC

func ConfigSpecToGRPC(s swarmtypes.ConfigSpec) swarmapi.ConfigSpec

ConfigSpecToGRPC converts Config to a grpc Config.

func GenericResourcesFromGRPC

func GenericResourcesFromGRPC(genericRes []*swarmapi.GenericResource) []types.GenericResource

GenericResourcesFromGRPC converts a GRPC GenericResource to a GenericResource

func GenericResourcesToGRPC

func GenericResourcesToGRPC(genericRes []types.GenericResource) []*swarmapi.GenericResource

GenericResourcesToGRPC converts a GenericResource to a GRPC GenericResource

func IsIngressNetwork

func IsIngressNetwork(n *swarmapi.Network) bool

IsIngressNetwork check if the swarm network is an ingress network

func IsolationFromGRPC

IsolationFromGRPC converts a swarm api container isolation to a moby isolation representation

func MergeSwarmSpecToGRPC added in v1.13.0

func MergeSwarmSpecToGRPC(s types.Spec, spec swarmapi.ClusterSpec) (swarmapi.ClusterSpec, error)

MergeSwarmSpecToGRPC merges a Spec with an initial grpc ClusterSpec

func NodeFromGRPC

func NodeFromGRPC(n swarmapi.Node) types.Node

NodeFromGRPC converts a grpc Node to a Node.

func NodeSpecToGRPC

func NodeSpecToGRPC(s types.NodeSpec) (swarmapi.NodeSpec, error)

NodeSpecToGRPC converts a NodeSpec to a grpc NodeSpec.

func SecretFromGRPC added in v1.13.0

func SecretFromGRPC(s *swarmapi.Secret) swarmtypes.Secret

SecretFromGRPC converts a grpc Secret to a Secret.

func SecretReferencesFromGRPC added in v1.13.0

func SecretReferencesFromGRPC(s []*swarmapi.SecretReference) []*swarmtypes.SecretReference

SecretReferencesFromGRPC converts a slice of grpc SecretReference to SecretReference

func SecretSpecToGRPC added in v1.13.0

func SecretSpecToGRPC(s swarmtypes.SecretSpec) swarmapi.SecretSpec

SecretSpecToGRPC converts Secret to a grpc Secret.

func ServiceFromGRPC

func ServiceFromGRPC(s swarmapi.Service) (types.Service, error)

ServiceFromGRPC converts a grpc Service to a Service.

func ServiceSpecToGRPC

func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error)

ServiceSpecToGRPC converts a ServiceSpec to a grpc ServiceSpec.

func SwarmFromGRPC

func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm

SwarmFromGRPC converts a grpc Cluster to a Swarm.

func SwarmPluginGetter

func SwarmPluginGetter(pg plugingetter.PluginGetter) plugin.Getter

SwarmPluginGetter adapts a plugingetter.PluginGetter to a Swarmkit plugin.Getter.

func SwarmSpecToGRPC

func SwarmSpecToGRPC(s types.Spec) (swarmapi.ClusterSpec, error)

SwarmSpecToGRPC converts a Spec to a grpc ClusterSpec.

func TaskFromGRPC

func TaskFromGRPC(t swarmapi.Task) (types.Task, error)

TaskFromGRPC converts a grpc Task to a Task.

func VolumeCreateToGRPC

func VolumeCreateToGRPC(volume *volumetypes.CreateOptions) *swarmapi.VolumeSpec

VolumeCreateToGRPC takes a VolumeCreateBody and outputs the matching swarmapi VolumeSpec.

func VolumeFromGRPC

func VolumeFromGRPC(v *swarmapi.Volume) volumetypes.Volume

VolumeFromGRPC converts a swarmkit api Volume object to a docker api Volume object

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL