convert

package
v1.12.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 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 ServiceFromGRPC

func ServiceFromGRPC(s swarmapi.Service) types.Service

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 SwarmSpecToGRPCandMerge

func SwarmSpecToGRPCandMerge(s types.Spec, existingSpec *swarmapi.ClusterSpec) (swarmapi.ClusterSpec, error)

SwarmSpecToGRPCandMerge converts a Spec to a grpc ClusterSpec and merge AcceptancePolicy from an existing grpc ClusterSpec if provided.

func SwarmSpecUpdateAcceptancePolicy

func SwarmSpecUpdateAcceptancePolicy(spec *swarmapi.ClusterSpec, acceptancePolicy types.AcceptancePolicy, oldSpec *swarmapi.ClusterSpec) error

SwarmSpecUpdateAcceptancePolicy updates a grpc ClusterSpec using AcceptancePolicy.

func TaskFromGRPC

func TaskFromGRPC(t swarmapi.Task) types.Task

TaskFromGRPC converts a grpc Task to a Task.

Types

This section is empty.

Jump to

Keyboard shortcuts

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