Documentation ¶
Index ¶
- type RouteManager
- func (r *RouteManager) Create(instanceId string, domainOpts types.DomainPlanOptions, ...) (*models.DomainRoute, error)
- func (*RouteManager) DeleteOrphanedCerts()
- func (*RouteManager) Disable(route *models.DomainRoute) error
- func (r *RouteManager) Get(instanceId string) (models.DomainRoute, error)
- func (r *RouteManager) GetDNSInstructions(route *models.DomainRoute) (leproviders.DomainMessenger, error)
- func (*RouteManager) Poll(route *models.DomainRoute) error
- func (*RouteManager) Populate() error
- func (*RouteManager) Renew(route *models.DomainRoute) error
- func (r *RouteManager) RenewAll()
- func (*RouteManager) Update(instanceId string, domainOpts types.DomainPlanOptions, ...) error
- func (r *RouteManager) UpdateElbs()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouteManager ¶
type RouteManager struct { // Internal database. Db *gorm.DB // Inherited from main. Logger lager.Logger // Global settings from the environment. Settings types.Settings // AWS IAM. IamSvc iamiface.IAMAPI // AWS CloudFront. CloudFrontSvc cloudfrontiface.CloudFrontAPI // AWS ELBv2 ElbSvc elbv2iface.ELBV2API // dns challenger Dns challenge.Provider // ACME Client, used mostly for testing. AcmeHttpClient *http.Client // DNS Resolvers Resolvers map[string]string // contains filtered or unexported fields }
RouteManager is the worker for managing custom domains. todo (mxplusb): add rate limiter to prevent rate limiting issues with ACME.
func NewManager ¶
func NewManager(logger lager.Logger, iam iamiface.IAMAPI, cloudFront cloudfrontiface.CloudFrontAPI, elbSvc elbv2iface.ELBV2API, settings types.Settings, db *gorm.DB, provider challenge.Provider, acmeClient *http.Client, resolvers map[string]string) (*RouteManager, error)
todo (mxplusb): prolly test this before the broker code.
func (*RouteManager) Create ¶
func (r *RouteManager) Create(instanceId string, domainOpts types.DomainPlanOptions, cdnOpts types.CdnPlanOptions, tags map[string]string) (*models.DomainRoute, error)
Create a new custom domain. todo (mxplusb): add hook for creating a CDN instance.
func (*RouteManager) DeleteOrphanedCerts ¶
func (*RouteManager) DeleteOrphanedCerts()
func (*RouteManager) Disable ¶
func (*RouteManager) Disable(route *models.DomainRoute) error
func (*RouteManager) Get ¶
func (r *RouteManager) Get(instanceId string) (models.DomainRoute, error)
Get the instance by it's instance ID.
func (*RouteManager) GetDNSInstructions ¶
func (r *RouteManager) GetDNSInstructions(route *models.DomainRoute) (leproviders.DomainMessenger, error)
GetDNSInstructions gets the stored DNS instructions from a given
func (*RouteManager) Poll ¶
func (*RouteManager) Poll(route *models.DomainRoute) error
func (*RouteManager) Populate ¶
func (*RouteManager) Populate() error
func (*RouteManager) Renew ¶
func (*RouteManager) Renew(route *models.DomainRoute) error
func (*RouteManager) RenewAll ¶
func (r *RouteManager) RenewAll()
todo (mxplusb): make sure this actually does the thing
func (*RouteManager) Update ¶
func (*RouteManager) Update(instanceId string, domainOpts types.DomainPlanOptions, cdnOpts types.CdnPlanOptions) error
Update is not supported yet.
func (*RouteManager) UpdateElbs ¶
func (r *RouteManager) UpdateElbs()
UpdateElbs is a cron job designed to keep the internal ELB references up-to-date so we don't need to store the info in a database and we can just reference it as needed. This should be run at least once a minute.