Documentation ¶
Index ¶
- func BasicNetworkCreateToGRPC(create basictypes.NetworkCreateRequest) swarmapi.NetworkSpec
- func BasicNetworkFromGRPC(n swarmapi.Network) basictypes.NetworkResource
- func NodeFromGRPC(n swarmapi.Node) types.Node
- func NodeSpecToGRPC(s types.NodeSpec) (swarmapi.NodeSpec, error)
- func ServiceFromGRPC(s swarmapi.Service) types.Service
- func ServiceSpecToGRPC(s types.ServiceSpec) (swarmapi.ServiceSpec, error)
- func SwarmFromGRPC(c swarmapi.Cluster) types.Swarm
- func SwarmSpecToGRPCandMerge(s types.Spec, existingSpec *swarmapi.ClusterSpec) (swarmapi.ClusterSpec, error)
- func SwarmSpecUpdateAcceptancePolicy(spec *swarmapi.ClusterSpec, acceptancePolicy types.AcceptancePolicy, ...) error
- func TaskFromGRPC(t swarmapi.Task) types.Task
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 ¶
NodeFromGRPC converts a grpc Node to a Node.
func NodeSpecToGRPC ¶
NodeSpecToGRPC converts a NodeSpec to a grpc NodeSpec.
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 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.
Types ¶
This section is empty.