Documentation
¶
Index ¶
- Constants
- type Backend
- type BackendConfig
- type RewriteRule
- type ServiceInstance
- type ServiceInstances
- type ServiceRegistration
- type ServiceRegistrations
- func (list ServiceRegistrations) Contains(sr ServiceRegistration) bool
- func (list ServiceRegistrations) FullString() string
- func (list ServiceRegistrations) Len() int
- func (list ServiceRegistrations) Less(i, j int) bool
- func (list ServiceRegistrations) Sort()
- func (list ServiceRegistrations) Swap(i, j int)
- type ServiceSelector
- type ServiceSelectors
- type User
- type Users
Constants ¶
const (
RobinFrontendRecordsAnnotationKey = "pulcy.com.robin.frontend.records"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
api.API
// Watch for changes in the backend and return where there is a change.
Watch() error
// Load all registered services
Services() (ServiceRegistrations, error)
}
func NewEtcdBackend ¶
func NewKubernetesBackend ¶
func NewKubernetesBackend(config BackendConfig, logger *logging.Logger) (Backend, error)
type BackendConfig ¶
type RewriteRule ¶
type ServiceInstance ¶
type ServiceInstance struct {
IP string // IP address to connect to to reach the service instance
Port int // Port to connect to to reach the service instance
}
func (ServiceInstance) FullString ¶
func (si ServiceInstance) FullString() string
type ServiceInstances ¶
type ServiceInstances []ServiceInstance
func (ServiceInstances) FullString ¶
func (list ServiceInstances) FullString() string
func (ServiceInstances) Len ¶
func (list ServiceInstances) Len() int
Len is the number of elements in the collection.
func (ServiceInstances) Less ¶
func (list ServiceInstances) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (ServiceInstances) Sort ¶
func (list ServiceInstances) Sort()
func (ServiceInstances) Swap ¶
func (list ServiceInstances) Swap(i, j int)
Swap swaps the elements with indexes i and j.
type ServiceRegistration ¶
type ServiceRegistration struct {
ServiceName string // Name of the service
ServicePort int // Port the service is listening on (inside its container)
EdgePort int // Port that Robin listening on for the service.
Public bool // If true, this service is exposed to the public network, otherwise it is only exposed to the private network.
Instances ServiceInstances // List instances of the service (can not be empty)
Selectors ServiceSelectors // List of selectors to match traffic to this service
HttpCheckPath string // Path (on the service) used for health checks (can be empty)
HttpCheckMethod string // Method (on the service) used for health checks (can be empty)
Mode string // http|tcp
Sticky bool // Switched blancing mode to source
Backup bool // If set all instances are backup only servers for their selectors
}
func (ServiceRegistration) FullString ¶
func (sr ServiceRegistration) FullString() string
func (*ServiceRegistration) HasAllowUnauthorized ¶
func (sr *ServiceRegistration) HasAllowUnauthorized() bool
func (ServiceRegistration) IsHttp ¶
func (sr ServiceRegistration) IsHttp() bool
func (ServiceRegistration) IsTcp ¶
func (sr ServiceRegistration) IsTcp() bool
func (ServiceRegistration) Normalize ¶
func (sr ServiceRegistration) Normalize() ServiceRegistration
type ServiceRegistrations ¶
type ServiceRegistrations []ServiceRegistration
func (ServiceRegistrations) Contains ¶
func (list ServiceRegistrations) Contains(sr ServiceRegistration) bool
func (ServiceRegistrations) FullString ¶
func (list ServiceRegistrations) FullString() string
func (ServiceRegistrations) Len ¶
func (list ServiceRegistrations) Len() int
Len is the number of elements in the collection.
func (ServiceRegistrations) Less ¶
func (list ServiceRegistrations) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (ServiceRegistrations) Sort ¶
func (list ServiceRegistrations) Sort()
func (ServiceRegistrations) Swap ¶
func (list ServiceRegistrations) Swap(i, j int)
Swap swaps the elements with indexes i and j.
type ServiceSelector ¶
type ServiceSelector struct {
Weight int // How important is this selector. (0-100), 100 being most important
Domain string // Domain to match on
SslCertName string // SSL certificate filename
TmpSslCertPath string // Path of generated certificate file
PathPrefix string // Prefix of HTTP path to match on
Users Users // If set, require authentication for one of these users
AllowInsecure bool // If set, allow insecure access to this path
RewriteRules []RewriteRule
}
func (ServiceSelector) FullString ¶
func (fs ServiceSelector) FullString() string
func (ServiceSelector) IsSecure ¶
func (ss ServiceSelector) IsSecure() bool
type ServiceSelectors ¶
type ServiceSelectors []ServiceSelector
func (ServiceSelectors) Contains ¶
func (list ServiceSelectors) Contains(sel ServiceSelector) bool
func (ServiceSelectors) FullString ¶
func (list ServiceSelectors) FullString() string
func (ServiceSelectors) Len ¶
func (list ServiceSelectors) Len() int
Len is the number of elements in the collection.
func (ServiceSelectors) Less ¶
func (list ServiceSelectors) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j.
func (ServiceSelectors) Sort ¶
func (list ServiceSelectors) Sort()
func (ServiceSelectors) Swap ¶
func (list ServiceSelectors) Swap(i, j int)
Swap swaps the elements with indexes i and j.