Documentation
¶
Index ¶
- Constants
- Variables
- func GetDiscoverPath() string
- func GetInstancePath(instanceId string) string
- func GetResolvePath() string
- func GetServiceInstancePath(serviceId, instanceId string) string
- func GetServicePath(serviceId string) string
- func GetServicesPath() string
- func GetTablePath() string
- func GetWhoAreYouPath() string
- func ResolveServiceInArchimedes(httpClient *http.Client, hostPort string) (string, error)
- type DiscoverMsg
- type Instance
- type NeighborDTO
- type ResolvedDTO
- type Service
- type ServiceDTO
- type ServicesTableEntryDTO
- type ToResolveDTO
- type TypeInstancesMapKey
- type TypeInstancesMapValue
Constants ¶
View Source
const ( PrefixPath = "/archimedes" ServicesPath = "/services" ServicePath = "/services/%s" ServiceInstancePath = "/services/%s/%s" InstancePath = "/instances/%s" DiscoverPath = "/discover" WhoAreYouPath = "/who" TablePath = "/table" ResolvePath = "/resolve" )
Paths
View Source
const ( StatusQueryVar = "status" StatusOutOfService = "OUT_OF_SERVICE" StatusUp = "UP" )
View Source
const ( ArchimedesServiceName = "archimedes" Port = 50000 )
Variables ¶
View Source
var (
DefaultHostPort = ArchimedesServiceName + ":" + strconv.Itoa(Port)
)
Functions ¶
func GetDiscoverPath ¶
func GetDiscoverPath() string
func GetInstancePath ¶
func GetResolvePath ¶
func GetResolvePath() string
func GetServiceInstancePath ¶
func GetServicePath ¶
func GetServicesPath ¶
func GetServicesPath() string
func GetTablePath ¶
func GetTablePath() string
func GetWhoAreYouPath ¶
func GetWhoAreYouPath() string
Types ¶
type DiscoverMsg ¶
type Instance ¶
type Instance struct { Id string ServiceId string Ip string PortTranslation nat.PortMap Initialized bool Static bool Local bool }
func (*Instance) ToTransfarable ¶
type NeighborDTO ¶
type NeighborDTO struct {
Addr string
}
type ResolvedDTO ¶
type Service ¶
func (*Service) ToTransfarable ¶
type ServiceDTO ¶
type ServicesTableEntryDTO ¶
type ToResolveDTO ¶
type TypeInstancesMapKey ¶
type TypeInstancesMapKey = string
type TypeInstancesMapValue ¶
type TypeInstancesMapValue = *Instance
Click to show internal directories.
Click to hide internal directories.