Services

class apiron.service.base.Service

Bases: apiron.service.base.ServiceBase

A base class for low-level services.

A service has a domain off of which one or more endpoints stem.

classmethod get_hosts() List[str]

The fully-qualified hostnames that correspond to this service. These are often determined by asking a load balancer or service discovery mechanism.

Returns

The hostname strings corresponding to this service

Return type

list

class apiron.service.discoverable.DiscoverableService

Bases: apiron.service.base.ServiceBase

A Service whose hosts are determined via a host resolver. A host resolver is any class with a resolve() method that takes a service name as its sole argument and returns a list of host names that correspond to that service.

classmethod get_hosts() List[str]

The fully-qualified hostnames that correspond to this service. These are often determined by asking a load balancer or service discovery mechanism.

Returns

The hostname strings corresponding to this service

Return type

list