Documentation ¶
Index ¶
- Variables
- func BasicNetworkCreateToGRPC(create network.CreateRequest) swarmapi.NetworkSpec
- func BasicNetworkFromGRPC(n swarmapi.Network) network.Inspect
- func ConfigFromGRPC(s *swarmapi.Config) swarmtypes.Config
- func ConfigReferencesFromGRPC(s []*swarmapi.ConfigReference) []*swarmtypes.ConfigReference
- func ConfigSpecToGRPC(s swarmtypes.ConfigSpec) swarmapi.ConfigSpec
- func GenericResourcesFromGRPC(genericRes []*swarmapi.GenericResource) []types.GenericResource
- func GenericResourcesToGRPC(genericRes []types.GenericResource) []*swarmapi.GenericResource
- func IsIngressNetwork(n *swarmapi.Network) bool
- func IsolationFromGRPC(i swarmapi.ContainerSpec_Isolation) container.Isolation
- func MergeSwarmSpecToGRPC(s types.Spec, spec swarmapi.ClusterSpec) (swarmapi.ClusterSpec, error)
- func NodeFromGRPC(n swarmapi.Node) types.Node
- func NodeSpecToGRPC(s types.NodeSpec) (swarmapi.NodeSpec, error)
- func SecretFromGRPC(s *swarmapi.Secret) swarmtypes.Secret
- func SecretReferencesFromGRPC(s []*swarmapi.SecretReference) []*swarmtypes.SecretReference
- func SecretSpecToGRPC(s swarmtypes.SecretSpec) swarmapi.SecretSpec
- func ServiceFromGRPC(s swarmapi.Service) (types.Service, error)
- func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error)
- func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm
- func SwarmPluginGetter(pg plugingetter.PluginGetter) plugin.Getter
- func SwarmSpecToGRPC(s types.Spec) (swarmapi.ClusterSpec, error)
- func TaskFromGRPC(t swarmapi.Task) (types.Task, error)
- func VolumeCreateToGRPC(volume *volumetypes.CreateOptions) *swarmapi.VolumeSpec
- func VolumeFromGRPC(v *swarmapi.Volume) volumetypes.Volume
Constants ¶
This section is empty.
Variables ¶
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 network.CreateRequest) swarmapi.NetworkSpec
BasicNetworkCreateToGRPC converts a NetworkCreateRequest to a grpc NetworkSpec.
func BasicNetworkFromGRPC ¶
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 ¶
IsIngressNetwork check if the swarm network is an ingress network
func IsolationFromGRPC ¶
func IsolationFromGRPC(i swarmapi.ContainerSpec_Isolation) container.Isolation
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 ¶
NodeFromGRPC converts a grpc Node to a Node.
func NodeSpecToGRPC ¶
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 ¶
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 ¶
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 ¶
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.