github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/daemon/cluster/provider/network.go (about)

     1  package provider // import "github.com/demonoid81/moby/daemon/cluster/provider"
     2  
     3  import "github.com/demonoid81/moby/api/types"
     4  
     5  // NetworkCreateRequest is a request when creating a network.
     6  type NetworkCreateRequest struct {
     7  	ID string
     8  	types.NetworkCreateRequest
     9  }
    10  
    11  // NetworkCreateResponse is a response when creating a network.
    12  type NetworkCreateResponse struct {
    13  	ID string `json:"Id"`
    14  }
    15  
    16  // VirtualAddress represents a virtual address.
    17  type VirtualAddress struct {
    18  	IPv4 string
    19  	IPv6 string
    20  }
    21  
    22  // PortConfig represents a port configuration.
    23  type PortConfig struct {
    24  	Name          string
    25  	Protocol      int32
    26  	TargetPort    uint32
    27  	PublishedPort uint32
    28  }
    29  
    30  // ServiceConfig represents a service configuration.
    31  type ServiceConfig struct {
    32  	ID               string
    33  	Name             string
    34  	Aliases          map[string][]string
    35  	VirtualAddresses map[string]*VirtualAddress
    36  	ExposedPorts     []*PortConfig
    37  }