- Waifus can be written in any language although low memory footprint languages are preffered, for example Rust or Go.
- On start waifu should send
POST
request tohttp://{orchestrator_host}/__internal/hello
with this payload:Orchestrator will expose waifu using reverse proxy on{ "name": "waifu name, with docker should be hostname", "host": "waifu host name or url, with docker should be hostname", // additional binds are optional // orchestrator may not respect them if they break orchestator rules // for example if it's invalid bind, it's already taken or it tries to bind // to main domain. "additionalBinds": { "https://link.waifu": "/link" } }
{main_domain}/{waifu_name}
. - If waifu wants a database, it needs to send
POST
request tohttp://{orchestrator_host}/__internal/database
with this payload:If database doesn't exists, orchestrator will create it and save hash of waifu secret. If it does exists, orchestrator will check validity or waifu secret key and if it's correct it will return response. In both cases the response is the same:{ "name": "waifu name", "secret": "waifu secret, each waifu should have their own secret key, so orchestrator can trust them" }
Waifu should cache those values. If secret key is invalid{ "database": "database_name", "user": "database_user", "password": "database_password", "host": "database_host", "port": "database_port" }
403 - Forbidden
will be returned and the incident will be reported ^^ - Waifu should expose endpoint
/__internal/health
returning HTTP status204 - No Content
, so orchestrator and other waifus can check waifu's health status. - Every path fragment starting from
__internal
won't be exposed by reverse proxy, so for communication inside waifus network prefix endpoints with__internal
path fragment - for example/__internal/health
.