Documentation
¶
Index ¶
- Variables
- func Key(id string) datastore.Key
- type AddressAssignment
- type Store
- func (s *Store) FindAssignmentByHostPort(ctx datastore.Context, ipAddr string, port uint16) (*AddressAssignment, error)
- func (s *Store) FindAssignmentByServiceEndpoint(ctx datastore.Context, serviceID, endpointName string) (*AddressAssignment, error)
- func (s *Store) GetServiceAddressAssignments(ctx datastore.Context, serviceID string) ([]AddressAssignment, error)
- func (s *Store) GetServiceAddressAssignmentsByPort(ctx datastore.Context, 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) ValidEntity ¶
func (a *AddressAssignment) ValidEntity() error
ValidEntity used to make sure AddressAssignment is in a valid state
type Store ¶
Store type for interacting with AddressAssignment persistent storage
func (*Store) FindAssignmentByHostPort ¶
func (*Store) FindAssignmentByServiceEndpoint ¶
func (*Store) GetServiceAddressAssignments ¶
func (*Store) GetServiceAddressAssignmentsByPort ¶
Click to show internal directories.
Click to hide internal directories.