Documentation ¶
Index ¶
- Variables
- func GetType() string
- func Key(id string) datastore.Key
- type AddressAssignment
- type AssignmentRequest
- type Store
- func (s *Store) FindAssignmentByHostPort(ctx datastore.Context, poolID string, ipAddr string, port uint16) (*AddressAssignment, error)
- func (s *Store) FindAssignmentByServiceEndpoint(ctx datastore.Context, serviceID, endpointName string) (*AddressAssignment, error)
- func (s *Store) GetAllAddressAssignments(ctx datastore.Context) ([]AddressAssignment, error)
- func (s *Store) GetServiceAddressAssignments(ctx datastore.Context, serviceID string) ([]AddressAssignment, error)
- func (s *Store) GetServiceAddressAssignmentsByPort(ctx datastore.Context, poolID string, port uint16) ([]AddressAssignment, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//MAPPING is the elastic mapping for an address assignment
MAPPING, _ = elastic.NewMapping(mappingString)
)
Functions ¶
Types ¶
type AddressAssignment ¶
type AddressAssignment struct { ID string //Generated id AssignmentType string //static or virtual HostID string //Host id if type is static PoolID string //Pool id if type is virtual IPAddr string //Used to associate to resource in Pool or Host Port uint16 //Actual assigned port ServiceID string //Service using this assignment EndpointName string //Endpoint in the service using the assignment datastore.VersionedEntity }
AddressAssignment is used to track Ports that have been assigned to a Service.
func (AddressAssignment) EqualIP ¶
func (assign AddressAssignment) EqualIP(b AddressAssignment) bool
EqualIP verifies the address assignment is the same by IP ONLY
func (*AddressAssignment) GetID ¶
func (a *AddressAssignment) GetID() string
GetID returns an AddressAssignment's ID It returns the ID as a string
func (*AddressAssignment) GetType ¶
func (a *AddressAssignment) GetType() string
GetType return the type for AddressAssignment objects It returns the type as a string
func (*AddressAssignment) ValidEntity ¶
func (a *AddressAssignment) ValidEntity() error
ValidEntity used to make sure AddressAssignment is in a valid state
type AssignmentRequest ¶
type AssignmentRequest struct { ServiceID string IPAddress string AutoAssignment bool Port uint16 Proto string EndpointName string }
AssignmentRequest is used to couple a serviceId to an IPAddress
type Store ¶
Store type for interacting with AddressAssignment persistent storage
func (*Store) FindAssignmentByHostPort ¶
func (*Store) FindAssignmentByServiceEndpoint ¶
func (*Store) GetAllAddressAssignments ¶
func (s *Store) GetAllAddressAssignments(ctx datastore.Context) ([]AddressAssignment, error)
func (*Store) GetServiceAddressAssignments ¶
func (*Store) GetServiceAddressAssignmentsByPort ¶
Click to show internal directories.
Click to hide internal directories.