Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Abstract
- { mkService, serviceArtifact, privateIfc, lbSource, authService, dataService, logService, logPath, secretsPath }:
- mkService {
- name = "service-name";
- version = "0.1.2";
- artifacts = [ serviceArtifact ];
- listens = [ { type = "tcp"; port = 9999; interface = privateIfc; } ];
- accepts = [ lbSource ]; # traffic sources to accept traffic from.
- talks = [ authService dataService logService ]; # this allows auto configuration given the service definitions of those in the specific environment.
- writes = [ logPath ];
- reads = [ secretsPath ];
- }
- # Needs to built with a "target" definition for runnable output, e.g. AWS-ASG, AWS-AMI, VirutalBox-VM, or whatever.
- # Also needs list of constraints such as "stripe across available availability zones in region R0", or "multi-region where primary in R0 and forwarded secondary system in R1"
- # So we have a signature like: Service -> Constraints -> Target -> RunnableInfrastructure
- # The above will be codified into dependent types to ensure basic sanity (at least) prevails in your running infrastructure.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement