File Source

Example(s) configuration file (YAML):

sources:
  - type: file
    config:
      path: file:///tmp/instances.yaml
  - type: file
    config:
      path: file+json:///tmp/instances.json
  - type: file
    config:
      path: https://mywebsite.com/configuration/instances.yaml
  - type: file
    config:
      path: https+json://mywebsite.com/configuration/instances.json
  - type: file
    config:
      path: https+json://mywebsite.com/configuration/instances.json
  - type: file
    config:
      path: pkgdata://sovereign:config/instances.yaml

Example of what the contents should look like:

- instance_id: <identifier>
  service_clusters:
    - P2
  parameters:
    clusters:
      - name: upstream
        healthchecks:
          - path: /healthcheck
        hosts:
          - address: aws.amazon.com
            port: 443
            region: us-east-1
      vhosts:
      - clusters:
          - name: upstream
        domains:
          - aws.amazon.com
          - amazon.dev.globaledge.internal
        name: vhost
        rewrite: 'yes'
class sovereign.sources.file.File(*args, **kwargs)

Bases: sovereign.sources.lib.Source

get()

Uses the file config loader to load the given path