Documentation
¶
Index ¶
- Variables
- func MachineLiveliness(ds *datastore.RethinkStore, logger *zap.SugaredLogger) error
- func NewFirewall(ds *datastore.RethinkStore, ipamer ipam.IPAMer, ep *bus.Endpoints, ...) (*restful.WebService, error)
- func NewIP(ds *datastore.RethinkStore, ep *bus.Endpoints, ipamer ipam.IPAMer, ...) (*restful.WebService, error)
- func NewImage(ds *datastore.RethinkStore) *restful.WebService
- func NewMachine(ds *datastore.RethinkStore, pub bus.Publisher, ep *bus.Endpoints, ...) (*restful.WebService, error)
- func NewNetwork(ds *datastore.RethinkStore, ipamer ipam.IPAMer, mdc mdm.Client) *restful.WebService
- func NewPartition(ds *datastore.RethinkStore, tc TopicCreator) *restful.WebService
- func NewProject(ds *datastore.RethinkStore, mdc mdm.Client) *restful.WebService
- func NewSize(ds *datastore.RethinkStore) *restful.WebService
- func NewSwitch(ds *datastore.RethinkStore) *restful.WebService
- func ResurrectMachines(ds *datastore.RethinkStore, publisher bus.Publisher, ep *bus.Endpoints, ...) error
- type Allocation
- type Allocator
- type MachineAllocation
- type TenantEnsurer
- type TopicCreator
- type UserDirectory
Constants ¶
This section is empty.
Variables ¶
var BasePath = "/"
BasePath is the URL base path for the metal-api
Functions ¶
func MachineLiveliness ¶ added in v0.5.7
func MachineLiveliness(ds *datastore.RethinkStore, logger *zap.SugaredLogger) error
MachineLiveliness evaluates whether machines are still alive or if they have died
func NewFirewall ¶
func NewFirewall( ds *datastore.RethinkStore, ipamer ipam.IPAMer, ep *bus.Endpoints, mdc mdm.Client, waitServer *grpc.WaitServer) (*restful.WebService, error)
NewFirewall returns a webservice for firewall specific endpoints.
func NewIP ¶
func NewIP(ds *datastore.RethinkStore, ep *bus.Endpoints, ipamer ipam.IPAMer, mdc mdm.Client) (*restful.WebService, error)
NewIP returns a webservice for ip specific endpoints.
func NewImage ¶
func NewImage(ds *datastore.RethinkStore) *restful.WebService
NewImage returns a webservice for image specific endpoints.
func NewMachine ¶
func NewMachine( ds *datastore.RethinkStore, pub bus.Publisher, ep *bus.Endpoints, ipamer ipam.IPAMer, mdc mdm.Client, waitServer *grpc.WaitServer) (*restful.WebService, error)
NewMachine returns a webservice for machine specific endpoints.
func NewNetwork ¶
func NewNetwork(ds *datastore.RethinkStore, ipamer ipam.IPAMer, mdc mdm.Client) *restful.WebService
NewNetwork returns a webservice for network specific endpoints.
func NewPartition ¶
func NewPartition(ds *datastore.RethinkStore, tc TopicCreator) *restful.WebService
NewPartition returns a webservice for partition specific endpoints.
func NewProject ¶
func NewProject(ds *datastore.RethinkStore, mdc mdm.Client) *restful.WebService
NewProject returns a webservice for project specific endpoints.
func NewSize ¶
func NewSize(ds *datastore.RethinkStore) *restful.WebService
NewSize returns a webservice for size specific endpoints.
func NewSwitch ¶
func NewSwitch(ds *datastore.RethinkStore) *restful.WebService
NewSwitch returns a webservice for switch specific endpoints.
func ResurrectMachines ¶
func ResurrectMachines(ds *datastore.RethinkStore, publisher bus.Publisher, ep *bus.Endpoints, ipamer ipam.IPAMer, logger *zap.SugaredLogger) error
ResurrectMachines attempts to resurrect machines that are obviously dead
Types ¶
type Allocation ¶
type Allocation <-chan MachineAllocation
An Allocation is a queue of allocated machines. You can read the machines to get the next allocated one.
type Allocator ¶
type Allocator func(Allocation) error
An Allocator is a callback for some piece of code if this wants to read allocated machines.
type MachineAllocation ¶
The MachineAllocation contains the allocated machine or an error.
type TenantEnsurer ¶
type TenantEnsurer struct {
// contains filtered or unexported fields
}
TenantEnsurer holds allowed tenants and a list of path suffixes that
func NewTenantEnsurer ¶
func NewTenantEnsurer(tenants, excludedPathSuffixes []string) TenantEnsurer
NewTenantEnsurer creates a new ensurer with the given tenants.
func (*TenantEnsurer) EnsureAllowedTenantFilter ¶
func (e *TenantEnsurer) EnsureAllowedTenantFilter(req *restful.Request, resp *restful.Response, chain *restful.FilterChain)
EnsureAllowedTenantFilter checks if the tenant of the user is allowed.
type TopicCreator ¶ added in v0.8.0
TopicCreator creates a topic for messaging.
type UserDirectory ¶
type UserDirectory struct {
// contains filtered or unexported fields
}
UserDirectory is the directory of users
func NewUserDirectory ¶
func NewUserDirectory(providerTenant string) *UserDirectory
NewUserDirectory creates a new user directory with default users
func (*UserDirectory) Get ¶
func (ud *UserDirectory) Get(user string) security.User
Get a user by its user name.
func (*UserDirectory) UserNames ¶
func (ud *UserDirectory) UserNames() []string
UserNames returns the list of user names in the directory.