Documentation
¶
Index ¶
- Constants
- func CreateContainer(state *record.ApplicationRecord) (container *runtime.Container, ok bool)
- func HostSocketDirectory() string
- func ValidateContainer(c *runtime.Container, state *record.ApplicationRecord) bool
- type ApplyRequest
- type CertificateRequest
- type Client
- type ConfigBuilder
- type Controller
- func (self *Controller) CleanUp(domain string, token string, keyAuth string) error
- func (self *Controller) GenerateCertificates(ctx context.Context, req *GenerateCertificateRequest) (*GenerateCertificateResponse, error)
- func (self *Controller) Present(domain string, token string, keyAuth string) error
- func (self *Controller) Run() error
- func (self *Controller) SetIngressConfig(ctx context.Context, req *IngressRequest) (*IngressResponse, error)
- type IngressRequestBuilder
- func (i *IngressRequestBuilder) AddEventEntries(entries ...string)
- func (i *IngressRequestBuilder) AddGeneralEntries(entries ...string)
- func (i *IngressRequestBuilder) AddHttpEntries(entries ...string)
- func (i *IngressRequestBuilder) AddServer(domain string, ipv6 bool, entries ...string) *ServerRequestBuilder
- func (i *IngressRequestBuilder) Build() *IngressRequest
- type LocationRequest
- type ServerRequest
- type ServerRequestBuilder
- type ServerRequestOption
- type ServerRequestOptions
Constants ¶
View Source
const ( CADirURL = lego.LEDirectoryStaging // Time until the ingress-daemon will consider the tls certificate to renew. // Aka if the time left until the certificate expires is less than this threshold TlsRenewThreshold = time.Hour * 24 )
View Source
const ( NginxConfigPath = "/etc/nginx/nginx.conf" SocketPath = "/run/zeus/nginx.sock" SocketMountPath = "/run/zeus" NginxPidFilePath = "/run/nginx.pid" )
View Source
const ApplyAPIPath = "/apply"
View Source
const (
DefaultClientTimeout = 5 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func CreateContainer ¶
func CreateContainer(state *record.ApplicationRecord) (container *runtime.Container, ok bool)
Creates an Ingress container which will be conntected to the network.
If an error happends the error is written into the state and it returns nil, false. If the container creation succeeds a it returns a container, true.
func HostSocketDirectory ¶
func HostSocketDirectory() string
Returns the directory which is be used to store the socket for IPC between the container and the application.
func ValidateContainer ¶
func ValidateContainer(c *runtime.Container, state *record.ApplicationRecord) bool
Types ¶
type ApplyRequest ¶
type ApplyRequest struct {
Servers []ServerRequest `json:"servers"`
}
func NewApplyRequest ¶
func NewApplyRequest() *ApplyRequest
func (*ApplyRequest) AddServer ¶
func (self *ApplyRequest) AddServer(opts ...ServerRequestOption)
type CertificateRequest ¶
type Client ¶
type Client struct { NginxControllerClient // contains filtered or unexported fields }
type ConfigBuilder ¶
type ConfigBuilder struct {
// contains filtered or unexported fields
}
func NewConfigBuilder ¶
func NewConfigBuilder() *ConfigBuilder
type Controller ¶
type Controller struct { UnimplementedNginxControllerServer // contains filtered or unexported fields }
func New ¶
func New() (*Controller, error)
func (*Controller) CleanUp ¶
func (self *Controller) CleanUp( domain string, token string, keyAuth string, ) error
func (*Controller) GenerateCertificates ¶
func (self *Controller) GenerateCertificates( ctx context.Context, req *GenerateCertificateRequest, ) (*GenerateCertificateResponse, error)
func (*Controller) Present ¶
func (self *Controller) Present( domain string, token string, keyAuth string, ) error
func (*Controller) Run ¶
func (self *Controller) Run() error
func (*Controller) SetIngressConfig ¶
func (self *Controller) SetIngressConfig( ctx context.Context, req *IngressRequest, ) (*IngressResponse, error)
type IngressRequestBuilder ¶
type IngressRequestBuilder struct {
// contains filtered or unexported fields
}
func NewIngressRequestBuilder ¶
func NewIngressRequestBuilder() *IngressRequestBuilder
func (*IngressRequestBuilder) AddEventEntries ¶
func (i *IngressRequestBuilder) AddEventEntries(entries ...string)
func (*IngressRequestBuilder) AddGeneralEntries ¶
func (i *IngressRequestBuilder) AddGeneralEntries(entries ...string)
func (*IngressRequestBuilder) AddHttpEntries ¶
func (i *IngressRequestBuilder) AddHttpEntries(entries ...string)
func (*IngressRequestBuilder) AddServer ¶
func (i *IngressRequestBuilder) AddServer( domain string, ipv6 bool, entries ...string, ) *ServerRequestBuilder
func (*IngressRequestBuilder) Build ¶
func (i *IngressRequestBuilder) Build() *IngressRequest
type LocationRequest ¶
type ServerRequest ¶
type ServerRequest struct { Domain string `json:"domain"` Certificate *CertificateRequest `json:"certificate"` Locations []LocationRequest `json:"locations"` IPv6Enabled bool `json:"ipv6Enabled"` }
type ServerRequestBuilder ¶
type ServerRequestBuilder struct {
// contains filtered or unexported fields
}
func (*ServerRequestBuilder) AddLocation ¶
func (s *ServerRequestBuilder) AddLocation( path string, matching Matching, entries ...string, )
func (*ServerRequestBuilder) AddTLS ¶
func (s *ServerRequestBuilder) AddTLS( fullchain string, privkey string, )
type ServerRequestOption ¶
type ServerRequestOption func(cfg *ServerRequest)
func WithCertificate ¶
func WithCertificate( privkeyPem string, fullchainPem string, ) ServerRequestOption
func WithDomain ¶
func WithDomain(domain string) ServerRequestOption
func WithIPv6Enabled ¶
func WithIPv6Enabled(ipv6Enabled bool) ServerRequestOption
func WithLocation ¶
func WithLocation( path string, matching string, serviceEndpoint string, ) ServerRequestOption
type ServerRequestOptions ¶
type ServerRequestOptions struct {
Options []ServerRequestOption
}
func NewServerRequestOptions ¶
func NewServerRequestOptions() *ServerRequestOptions
func (*ServerRequestOptions) Add ¶
func (self *ServerRequestOptions) Add(opt ...ServerRequestOption)
Click to show internal directories.
Click to hide internal directories.