Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) AddHost(host host.Host) ([]byte, error)
- func (c *Client) AddHostPrivate(host host.Host) ([]byte, error)
- func (c *Client) AddPublicEndpointPort(serviceid, endpointName, portAddr string, usetls bool, protocol string, ...) (*servicedefinition.Port, error)
- func (c *Client) AddPublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled, restart bool) (*servicedefinition.VHost, error)
- func (c *Client) AddResourcePool(pool pool.ResourcePool) error
- func (c *Client) AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate) (templateID string, err error)
- func (c *Client) AddVirtualIP(requestVirtualIP pool.VirtualIP) error
- func (c *Client) AuthenticateHost(hostID string) (string, int64, error)
- func (c *Client) ClearEmergency(serviceID string) (int, error)
- func (c *Client) Close() (err error)
- func (c *Client) DebugDisableMetrics() (string, error)
- func (c *Client) DebugEnableMetrics() (string, error)
- func (c *Client) DeployTemplate(request servicetemplate.ServiceTemplateDeploymentRequest) (tenantIDs []string, err error)
- func (c *Client) DockerOverride(newImage, oldImage string) error
- func (c *Client) EnablePublicEndpointPort(serviceid, endpointName, portAddr string, isEnabled bool) error
- func (c *Client) EnablePublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled bool) error
- func (c *Client) FindHostsInPool(poolID string) ([]host.Host, error)
- func (c *Client) GetActiveHostIDs() ([]string, error)
- func (c *Client) GetAllPublicEndpoints() ([]service.PublicEndpoint, error)
- func (c *Client) GetAllServiceDetails(since time.Duration) ([]service.ServiceDetails, error)
- func (c *Client) GetEvaluatedService(serviceID string, instanceID int) (*service.Service, string, string, error)
- func (c *Client) GetHost(hostID string) (*host.Host, error)
- func (c *Client) GetHostPublicKey(hostID string) ([]byte, error)
- func (c *Client) GetHosts() ([]host.Host, error)
- func (c *Client) GetISvcsHealth(IServiceNames []string) ([]isvcs.IServiceHealthResult, error)
- func (c *Client) GetPoolIPs(poolID string) (*pool.PoolIPs, error)
- func (c *Client) GetResourcePool(poolID string) (*pool.ResourcePool, error)
- func (c *Client) GetResourcePools() ([]pool.ResourcePool, error)
- func (c *Client) GetService(serviceID string) (*service.Service, error)
- func (c *Client) GetServiceDetails(serviceID string) (*service.ServiceDetails, error)
- func (c *Client) GetServiceDetailsByTenantID(tenantID string) ([]service.ServiceDetails, error)
- func (c *Client) GetServiceEndpoints(serviceIDs []string, reportImports, reportExports bool, validate bool) ([]applicationendpoint.EndpointReport, error)
- func (c *Client) GetServiceInstances(serviceID string) ([]service.Instance, error)
- func (c *Client) GetServiceTemplates() (map[string]servicetemplate.ServiceTemplate, error)
- func (c *Client) GetServicesHealth() (map[string]map[int]map[string]health.HealthStatus, error)
- func (c *Client) GetSystemUser() (user.User, error)
- func (c *Client) GetTenantID(serviceID string) (string, error)
- func (c *Client) GetVolumeStatus() (*volume.Statuses, error)
- func (c *Client) HostsAuthenticated(hostIDs []string) (map[string]bool, error)
- func (c *Client) LocateServiceInstance(serviceID string, instanceID int) (*service.LocationInstance, error)
- func (c *Client) RemoveHost(hostID string) error
- func (c *Client) RemoveIPs(args []string) error
- func (c *Client) RemovePublicEndpointPort(serviceid, endpointName, portAddr string) error
- func (c *Client) RemovePublicEndpointVHost(serviceid, endpointName, vhost string) error
- func (c *Client) RemoveResourcePool(poolID string) error
- func (c *Client) RemoveServiceTemplate(serviceTemplateID string) error
- func (c *Client) RemoveVirtualIP(requestVirtualIP pool.VirtualIP) error
- func (c *Client) ReportHealthStatus(key health.HealthStatusKey, value health.HealthStatus, expires time.Duration) error
- func (c *Client) ReportInstanceDead(serviceID string, instanceID int) error
- func (c *Client) ResetHostKey(hostID string) ([]byte, error)
- func (c *Client) ResetRegistry() error
- func (c *Client) ResolveServicePath(path string, noprefix bool) ([]service.ServiceDetails, error)
- func (c *Client) SendDockerAction(serviceID string, instanceID int, action string, args []string) error
- func (c *Client) ServiceUse(tenantID string, serviceID string, imageID string, registry string, ...) (string, error)
- func (c *Client) SetIPs(r addressassignment.AssignmentRequest) error
- func (c *Client) StopServiceInstance(serviceID string, instanceID int) error
- func (c *Client) SyncRegistry() error
- func (c *Client) UpdateHost(host host.Host) error
- func (c *Client) UpdateResourcePool(pool pool.ResourcePool) error
- func (c *Client) UpgradeRegistry(endpoint string, override bool) error
- func (c *Client) ValidateCredentials(user user.User) (bool, error)
- func (c *Client) WaitService(serviceIDs []string, state service.DesiredState, timeout time.Duration, ...) error
- type ClientInterface
- type DockerActionRequest
- type DockerOverrideRequest
- type EndpointRequest
- type EvaluateServiceRequest
- type EvaluateServiceResponse
- type HealthStatusRequest
- type HostAuthenticationRequest
- type HostAuthenticationResponse
- type PublicEndpointRequest
- type ReportDeadInstanceRequest
- type ResolveServiceRequest
- type Server
- func (s *Server) AddHost(host host.Host, hostReply *[]byte) error
- func (s *Server) AddHostPrivate(host host.Host, hostReply *[]byte) error
- func (s *Server) AddPublicEndpointPort(request *PublicEndpointRequest, reply *servicedefinition.Port) error
- func (s *Server) AddPublicEndpointVHost(request *PublicEndpointRequest, reply *servicedefinition.VHost) error
- func (s *Server) AddResourcePool(pool pool.ResourcePool, _ *struct{}) error
- func (s *Server) AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate, response *string) error
- func (s *Server) AddVirtualIP(requestVirtualIP pool.VirtualIP, _ *struct{}) error
- func (s *Server) AuthenticateHost(req HostAuthenticationRequest, resp *HostAuthenticationResponse) error
- func (s *Server) ClearEmergency(serviceID string, count *int) error
- func (s *Server) DebugDisableMetrics(unused struct{}, results *string) error
- func (s *Server) DebugEnableMetrics(unused struct{}, results *string) error
- func (s *Server) DeployTemplate(request servicetemplate.ServiceTemplateDeploymentRequest, response *[]string) error
- func (s *Server) DockerOverride(overrideReq DockerOverrideRequest, _ *int) error
- func (s *Server) EnablePublicEndpointPort(request *PublicEndpointRequest, _ *struct{}) error
- func (s *Server) EnablePublicEndpointVHost(request *PublicEndpointRequest, _ *struct{}) error
- func (s *Server) FindHostsInPool(poolID string, hostReply *[]host.Host) error
- func (s *Server) GetActiveHostIDs(empty struct{}, hostReply *[]string) error
- func (s *Server) GetAllPublicEndpoints(empty struct{}, publicEndpoints *[]service.PublicEndpoint) error
- func (s *Server) GetAllServiceDetails(since time.Duration, response *[]service.ServiceDetails) error
- func (s *Server) GetEvaluatedService(request EvaluateServiceRequest, response *EvaluateServiceResponse) error
- func (s *Server) GetHost(hostID string, reply *host.Host) error
- func (s *Server) GetHostPublicKey(hostID string, key *[]byte) error
- func (s *Server) GetHosts(empty struct{}, hostReply *[]host.Host) error
- func (s *Server) GetISvcsHealth(IServiceNames []string, results *[]isvcs.IServiceHealthResult) error
- func (s *Server) GetPoolIPs(poolID string, reply *pool.PoolIPs) error
- func (s *Server) GetResourcePool(poolID string, reply *pool.ResourcePool) error
- func (s *Server) GetResourcePools(empty struct{}, poolsReply *[]pool.ResourcePool) error
- func (s *Server) GetService(serviceID string, svc *service.Service) error
- func (s *Server) GetServiceDetails(serviceID string, response *service.ServiceDetails) error
- func (s *Server) GetServiceDetailsByTenantID(tenantID string, response *[]service.ServiceDetails) error
- func (s *Server) GetServiceEndpoints(request *EndpointRequest, reply *[]applicationendpoint.EndpointReport) error
- func (s *Server) GetServiceInstances(serviceID string, res *[]service.Instance) (err error)
- func (s *Server) GetServiceTemplates(unused struct{}, response *map[string]servicetemplate.ServiceTemplate) error
- func (s *Server) GetServicesHealth(unused struct{}, results *map[string]map[int]map[string]health.HealthStatus) error
- func (s *Server) GetSystemUser(unused struct{}, systemUser *user.User) error
- func (s *Server) GetTenantID(serviceID string, tenantId *string) error
- func (s *Server) GetVolumeStatus(empty struct{}, reply *volume.Statuses) error
- func (s *Server) HostsAuthenticated(hostIDs []string, res *map[string]bool) error
- func (s *Server) LocateServiceInstance(req ServiceInstanceRequest, res *service.LocationInstance) (err error)
- func (s *Server) RemoveHost(hostID string, _ *struct{}) error
- func (s *Server) RemoveIPs(args []string, unused *string) error
- func (s *Server) RemovePublicEndpointPort(request *PublicEndpointRequest, _ *struct{}) error
- func (s *Server) RemovePublicEndpointVHost(request *PublicEndpointRequest, _ *struct{}) error
- func (s *Server) RemoveResourcePool(poolID string, _ *struct{}) error
- func (s *Server) RemoveServiceTemplate(templateID string, _ *struct{}) error
- func (s *Server) RemoveVirtualIP(requestVirtualIP pool.VirtualIP, _ *struct{}) error
- func (s *Server) ReportHealthStatus(request HealthStatusRequest, _ *struct{}) error
- func (s *Server) ReportInstanceDead(request ReportDeadInstanceRequest, _ *struct{}) error
- func (s *Server) ResetHostKey(hostID string, key *[]byte) error
- func (s *Server) ResetRegistry(req struct{}, reply *int) error
- func (s *Server) ResolveServicePath(request ResolveServiceRequest, response *[]service.ServiceDetails) error
- func (s *Server) SendDockerAction(req DockerActionRequest, unused *string) (err error)
- func (s *Server) ServiceUse(request *ServiceUseRequest, response *string) error
- func (s *Server) SetIPs(request addressassignment.AssignmentRequest, unused *string) error
- func (s *Server) StopServiceInstance(req ServiceInstanceRequest, unused *string) (err error)
- func (s *Server) SyncRegistry(req struct{}, reply *int) error
- func (s *Server) UpdateHost(host host.Host, _ *struct{}) error
- func (s *Server) UpdateResourcePool(pool pool.ResourcePool, _ *struct{}) error
- func (s *Server) UpgradeRegistry(req UpgradeDockerRequest, reply *int) error
- func (s *Server) ValidateCredentials(someUser user.User, valid *bool) error
- func (s *Server) WaitService(request *WaitServiceRequest, throwaway *string) error
- type ServiceDetailsByTenantIDRequest
- type ServiceInstanceRequest
- type ServiceUseRequest
- type UpgradeDockerRequest
- type WaitServiceRequest
Constants ¶
This section is empty.
Variables ¶
var ( ErrRequestExpired = errors.New("Authentication request expired") ErrRequestFromFuture = errors.New("Authentication request has future timestamp") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client a client for interacting with the serviced master
func (*Client) AddHostPrivate ¶
AddHost adds and registers a host with an agreed-upon shared secret keypair. Returns master's public key.
func (*Client) AddPublicEndpointPort ¶
func (c *Client) AddPublicEndpointPort(serviceid, endpointName, portAddr string, usetls bool, protocol string, isEnabled bool, restart bool) (*servicedefinition.Port, error)
Adds a port public endpoint to a service.
func (*Client) AddPublicEndpointVHost ¶
func (c *Client) AddPublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled, restart bool) (*servicedefinition.VHost, error)
Adds a vhost public endpoint to a service.
func (*Client) AddResourcePool ¶
func (c *Client) AddResourcePool(pool pool.ResourcePool) error
AddResourcePool adds the ResourcePool
func (*Client) AddServiceTemplate ¶
func (c *Client) AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate) (templateID string, err error)
Add a new service template
func (*Client) AddVirtualIP ¶
AddVirtualIP adds a VirtualIP to a specificpool
func (*Client) AuthenticateHost ¶
AuthenticateHost authenticates a host
func (*Client) ClearEmergency ¶
ClearEmergency clears the EmergencyShutdown flag on a service and all child services it returns the number of affected services
func (*Client) DebugDisableMetrics ¶
Disable internal metrics collection
func (*Client) DebugEnableMetrics ¶
Enable internal metrics collection
func (*Client) DeployTemplate ¶
func (c *Client) DeployTemplate(request servicetemplate.ServiceTemplateDeploymentRequest) (tenantIDs []string, err error)
Deploy a service Template
func (*Client) DockerOverride ¶
DockerOverride replaces an image in the registry with a new image
func (*Client) EnablePublicEndpointPort ¶
func (c *Client) EnablePublicEndpointPort(serviceid, endpointName, portAddr string, isEnabled bool) error
Enable/disable a port public endpoint for a service.
func (*Client) EnablePublicEndpointVHost ¶
func (c *Client) EnablePublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled bool) error
Enable/disable a vhost public endpoint for a service.
func (*Client) FindHostsInPool ¶
FindHostsInPool returns all hosts in a pool
func (*Client) GetActiveHostIDs ¶
GetActiveHosts returns all active host ids or empty array
func (*Client) GetAllPublicEndpoints ¶
func (c *Client) GetAllPublicEndpoints() ([]service.PublicEndpoint, error)
GetAllPublicEndpoints
func (*Client) GetAllServiceDetails ¶
GetAllServiceDetails will return a list of all ServiceDetails
func (*Client) GetEvaluatedService ¶
func (c *Client) GetEvaluatedService(serviceID string, instanceID int) (*service.Service, string, string, error)
GetEvaluatedService returns a service where an evaluation has been executed against all templated properties.
func (*Client) GetISvcsHealth ¶
func (c *Client) GetISvcsHealth(IServiceNames []string) ([]isvcs.IServiceHealthResult, error)
GetISvcsHealth returns health status for a list of isvcs
func (*Client) GetPoolIPs ¶
GetPoolIPs returns a all IPs in a ResourcePool.
func (*Client) GetResourcePool ¶
func (c *Client) GetResourcePool(poolID string) (*pool.ResourcePool, error)
GetResourcePool gets the pool for the given poolID or nil
func (*Client) GetResourcePools ¶
func (c *Client) GetResourcePools() ([]pool.ResourcePool, error)
GetResourcePools returns all pools or empty array
func (*Client) GetService ¶
GetService returns a service with a particular service id.
func (*Client) GetServiceDetails ¶
func (c *Client) GetServiceDetails(serviceID string) (*service.ServiceDetails, error)
GetServiceDetails will return a ServiceDetails for the specified service
func (*Client) GetServiceDetailsByTenantID ¶
func (c *Client) GetServiceDetailsByTenantID(tenantID string) ([]service.ServiceDetails, error)
GetServiceDetailsByTenantID will return a list of ServiceDetails for the specified tenant ID
func (*Client) GetServiceEndpoints ¶
func (c *Client) GetServiceEndpoints(serviceIDs []string, reportImports, reportExports bool, validate bool) ([]applicationendpoint.EndpointReport, error)
GetServiceEndpoints gets the endpoints for one or more services
func (*Client) GetServiceInstances ¶
GetServiceInstances returns all instances of a service
func (*Client) GetServiceTemplates ¶
func (c *Client) GetServiceTemplates() (map[string]servicetemplate.ServiceTemplate, error)
Get a list of service templates
func (*Client) GetServicesHealth ¶
GetServicesHealth returns health checks for all services.
func (*Client) GetSystemUser ¶
Get the system user record
func (*Client) GetTenantID ¶
GetTenantID returns the ID of the service's tenant (i.e. the root service's ID)
func (*Client) GetVolumeStatus ¶
GetVolumeStatus gets status information for the given volume or nil
func (*Client) HostsAuthenticated ¶
func (*Client) LocateServiceInstance ¶
func (c *Client) LocateServiceInstance(serviceID string, instanceID int) (*service.LocationInstance, error)
LocateServiceInstance returns the location of a service instance
func (*Client) RemoveHost ¶
RemoveHost removes a host
func (*Client) RemovePublicEndpointPort ¶
Remove a port public endpoint from a service.
func (*Client) RemovePublicEndpointVHost ¶
Remove a vhost public endpoint from a service.
func (*Client) RemoveResourcePool ¶
RemoveResourcePool removes a ResourcePool
func (*Client) RemoveServiceTemplate ¶
Remove a service Template
func (*Client) RemoveVirtualIP ¶
RemoveVirtualIP removes a VirtualIP from a specific pool
func (*Client) ReportHealthStatus ¶
func (c *Client) ReportHealthStatus(key health.HealthStatusKey, value health.HealthStatus, expires time.Duration) error
ReportHealthStatus sends an update to the health check status cache.
func (*Client) ReportInstanceDead ¶
ReportInstanceDead removes stopped instances from the health check status cache.
func (*Client) ResetRegistry ¶
ResetRegistry pulls latest from the running docker registry and updates the index.
func (*Client) ResolveServicePath ¶
ResolveServicePath resolves a service path (e.g., "infrastructure/mariadb") to zero or more ServiceDetails.
func (*Client) SendDockerAction ¶
func (c *Client) SendDockerAction(serviceID string, instanceID int, action string, args []string) error
SendDockerAction submits an action to a docker container
func (*Client) ServiceUse ¶
func (c *Client) ServiceUse(tenantID string, serviceID string, imageID string, registry string, replaceImgs []string, noOp bool) (string, error)
ServiceUse will use a new image for a given service - this will pull the image and tag it
func (*Client) SetIPs ¶
func (c *Client) SetIPs(r addressassignment.AssignmentRequest) error
Assigns an IP address to a services that haven't IP Assignment by default
func (*Client) StopServiceInstance ¶
StopServiceInstance stops a service instance.
func (*Client) SyncRegistry ¶
SyncRegistry sends a signal to the master to repush all images into the docker registry.
func (*Client) UpdateHost ¶
UpdateHost updates a host
func (*Client) UpdateResourcePool ¶
func (c *Client) UpdateResourcePool(pool pool.ResourcePool) error
UpdateResourcePool adds the ResourcePool
func (*Client) UpgradeRegistry ¶
UpgradeRegistry migrates images from an older or remote docker registry and updates the index.
func (*Client) ValidateCredentials ¶
Validate the credentials of the specified user
func (*Client) WaitService ¶
func (c *Client) WaitService(serviceIDs []string, state service.DesiredState, timeout time.Duration, recursive bool) error
WaitService will wait for the specified services to reach the specified state, within the given timeout
type ClientInterface ¶
type ClientInterface interface { //-------------------------------------------------------------------------- // RPC Management Functions Close() (err error) // GetHost gets the host for the given hostID or nil GetHost(hostID string) (*host.Host, error) // GetHosts returns all hosts or empty array GetHosts() ([]host.Host, error) // GetActiveHosts returns all active host ids or empty array GetActiveHostIDs() ([]string, error) // AddHost adds a Host AddHost(h host.Host) ([]byte, error) // AddHostPrivate adds a Host and registers it with a shared key AddHostPrivate(h host.Host) ([]byte, error) // UpdateHost updates a host UpdateHost(h host.Host) error // RemoveHost removes a host RemoveHost(hostID string) error // FindHostsInPool returns all hosts in a pool FindHostsInPool(poolID string) ([]host.Host, error) // Authenticate a host and receive an identity token and expiration AuthenticateHost(hostID string) (string, int64, error) // Get hostID's public key GetHostPublicKey(hostID string) ([]byte, error) // Reset hostID's private key ResetHostKey(hostID string) ([]byte, error) // HostsAuthenticated returns if the hosts passed are authenticated or not HostsAuthenticated(hostIDs []string) (map[string]bool, error) // GetResourcePool gets the pool for the given poolID or nil GetResourcePool(poolID string) (*pool.ResourcePool, error) // GetResourcePools returns all pools or empty array GetResourcePools() ([]pool.ResourcePool, error) // AddResourcePool adds the ResourcePool AddResourcePool(p pool.ResourcePool) error // UpdateResourcePool adds the ResourcePool UpdateResourcePool(p pool.ResourcePool) error // RemoveResourcePool removes a ResourcePool RemoveResourcePool(poolID string) error // GetPoolIPs returns a all IPs in a ResourcePool. GetPoolIPs(poolID string) (*pool.PoolIPs, error) // AddVirtualIP adds a VirtualIP to a specific pool AddVirtualIP(requestVirtualIP pool.VirtualIP) error // RemoveVirtualIP removes a VirtualIP from a specific pool RemoveVirtualIP(requestVirtualIP pool.VirtualIP) error // ServiceUse will use a new image for a given service - this will pull the image and tag it ServiceUse(tenantID string, serviceID string, imageID string, registry string, replaceImgs []string, noOp bool) (string, error) // WaitService will wait for the specified services to reach the specified state, within the given timeout WaitService(serviceIDs []string, state service.DesiredState, timeout time.Duration, recursive bool) error // GetAllServiceDetails will return a list of all ServiceDetails GetAllServiceDetails(since time.Duration) ([]service.ServiceDetails, error) // GetServiceDetailsByTenantID will return a list of ServiceDetails for the specified tenant ID GetServiceDetailsByTenantID(tenantID string) ([]service.ServiceDetails, error) // GetServiceDetails will return a ServiceDetails for the specified service GetServiceDetails(serviceID string) (*service.ServiceDetails, error) // ResolveServicePath will return ServiceDetails that match the given path and prefix matching style ResolveServicePath(path string, noprefix bool) ([]service.ServiceDetails, error) // ClearEmergency will set EmergencyShutdown to false on the service and all child services ClearEmergency(serviceID string) (int, error) // GetServiceInstances returns all running instances of a service GetServiceInstances(serviceID string) ([]service.Instance, error) // Get a service from serviced where all templated properties have been evaluated GetEvaluatedService(serviceID string, instanceID int) (*service.Service, string, string, error) // Get the tenant ID for a service GetTenantID(serviceID string) (string, error) // StopServiceInstance stops a single service instance StopServiceInstance(serviceID string, instanceID int) error // LocateServiceInstance returns location information about a service // instance LocateServiceInstance(serviceID string, instanceID int) (*service.LocationInstance, error) // SendDockerAction submits a docker action to a running container SendDockerAction(serviceID string, instanceID int, action string, args []string) error // Add a new service template AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate) (templateID string, err error) // Get a list of ServiceTemplates GetServiceTemplates() (serviceTemplates map[string]servicetemplate.ServiceTemplate, err error) // Remove a service Template RemoveServiceTemplate(serviceTemplateID string) error // Deploy an application template DeployTemplate(request servicetemplate.ServiceTemplateDeploymentRequest) (tenantIDs []string, err error) // GetVolumeStatus gets status information for the given volume or nil GetVolumeStatus() (*volume.Statuses, error) // GetServiceEndpoints gets the endpoints for one or more services GetServiceEndpoints(serviceIDs []string, reportImports, reportExports bool, validate bool) ([]applicationendpoint.EndpointReport, error) // ResetRegistry pulls images from the docker registry and updates the // index. ResetRegistry() error // SyncRegistry prompts the master to push its images into the docker // registry. SyncRegistry() error // UpgradeRegistry migrates images from an older or remote docker registry. UpgradeRegistry(endpoint string, override bool) error // DockerOverride replaces an image in the docker registry with a new image DockerOverride(newImage, oldImage string) error //-------------------------------------------------------------------------- // Public Endpoint Management Functions AddPublicEndpointPort(serviceid, endpointName, portAddr string, usetls bool, protocol string, isEnabled bool, restart bool) (*servicedefinition.Port, error) RemovePublicEndpointPort(serviceid, endpointName, portAddr string) error EnablePublicEndpointPort(serviceid, endpointName, portAddr string, isEnabled bool) error AddPublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled, restart bool) (*servicedefinition.VHost, error) RemovePublicEndpointVHost(serviceid, endpointName, vhost string) error EnablePublicEndpointVHost(serviceid, endpointName, vhost string, isEnabled bool) error GetAllPublicEndpoints() ([]service.PublicEndpoint, error) // Get the system user record GetSystemUser() (user.User, error) // Validate the credentials of the specified user ValidateCredentials(user user.User) (bool, error) // GetISvcsHealth returns health status for a list of isvcs GetISvcsHealth(IServiceNames []string) ([]isvcs.IServiceHealthResult, error) // GetServicesHealth returns health checks for all services. GetServicesHealth() (map[string]map[int]map[string]health.HealthStatus, error) // ReportHealthStatus sends an update to the health check status cache. ReportHealthStatus(key health.HealthStatusKey, value health.HealthStatus, expires time.Duration) error // ReportInstanceDead removes stopped instances from the health check status cache. ReportInstanceDead(serviceID string, instanceID int) error // Enable internal metrics collection DebugEnableMetrics() (string, error) // Disable internal metrics collection DebugDisableMetrics() (string, error) // Remove the IP assignment of a service's endpoints RemoveIPs(args []string) error // Assigns an IP address to a services that haven't IP Assignment by default SetIPs(request addressassignment.AssignmentRequest) error }
The RPC interface is the API for a serviced master.
type DockerActionRequest ¶
type DockerOverrideRequest ¶
DockerOverrideRequest are options for replacing an image in the docker registry
type EndpointRequest ¶
type EndpointRequest struct { ServiceIDs []string ReportImports bool ReportExports bool Validate bool }
Defines a request to get a list of endpoints for one or more services
type EvaluateServiceRequest ¶
type EvaluateServiceResponse ¶
type HealthStatusRequest ¶
type HealthStatusRequest struct { Key health.HealthStatusKey Value health.HealthStatus Expires time.Duration }
HealthStatusRequest sends health status data to the health status cache.
type PublicEndpointRequest ¶
type PublicEndpointRequest struct { Serviceid string EndpointName string Name string UseTLS bool Protocol string IsEnabled bool Restart bool }
Defines a request to add a port public endpoints to a service
type ResolveServiceRequest ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the RPC type for the master(s)
func (*Server) AddHostPrivate ¶
AddHostPrivate adds the host using a shared key approved of beforehand and returns the master's public key.
func (*Server) AddPublicEndpointPort ¶
func (s *Server) AddPublicEndpointPort(request *PublicEndpointRequest, reply *servicedefinition.Port) error
Adds a port public endpoint to a service.
func (*Server) AddPublicEndpointVHost ¶
func (s *Server) AddPublicEndpointVHost(request *PublicEndpointRequest, reply *servicedefinition.VHost) error
Adds a vhost public endpoint to a service.
func (*Server) AddResourcePool ¶
func (s *Server) AddResourcePool(pool pool.ResourcePool, _ *struct{}) error
AddResourcePool adds the pool
func (*Server) AddServiceTemplate ¶
func (s *Server) AddServiceTemplate(serviceTemplate servicetemplate.ServiceTemplate, response *string) error
Add a new service template
func (*Server) AddVirtualIP ¶
AddVirtualIP adds a specific virtual IP to a pool
func (*Server) AuthenticateHost ¶
func (s *Server) AuthenticateHost(req HostAuthenticationRequest, resp *HostAuthenticationResponse) error
func (*Server) ClearEmergency ¶
ClearEmergency clears the EmergencyShutdown flag on a service and all child services it returns the number of affected services
func (*Server) DebugDisableMetrics ¶
func (*Server) DebugEnableMetrics ¶
func (*Server) DeployTemplate ¶
func (s *Server) DeployTemplate(request servicetemplate.ServiceTemplateDeploymentRequest, response *[]string) error
Deploy a service template
func (*Server) DockerOverride ¶
func (s *Server) DockerOverride(overrideReq DockerOverrideRequest, _ *int) error
DockerOverride replaces an image in the registry with a new image
func (*Server) EnablePublicEndpointPort ¶
func (s *Server) EnablePublicEndpointPort(request *PublicEndpointRequest, _ *struct{}) error
Enable/disable a port public endpoint for a service.
func (*Server) EnablePublicEndpointVHost ¶
func (s *Server) EnablePublicEndpointVHost(request *PublicEndpointRequest, _ *struct{}) error
Enable/disable a vhost public endpoint for a service.
func (*Server) FindHostsInPool ¶
FindHostsInPool Returns all Hosts in a pool
func (*Server) GetActiveHostIDs ¶
GetActiveHosts returns all active host ids
func (*Server) GetAllPublicEndpoints ¶
func (s *Server) GetAllPublicEndpoints(empty struct{}, publicEndpoints *[]service.PublicEndpoint) error
GetAllPublicEndpoints get all public endpoints
func (*Server) GetAllServiceDetails ¶
func (s *Server) GetAllServiceDetails(since time.Duration, response *[]service.ServiceDetails) error
GetAllServiceDetails will return a list of all ServiceDetails
func (*Server) GetEvaluatedService ¶
func (s *Server) GetEvaluatedService(request EvaluateServiceRequest, response *EvaluateServiceResponse) error
GetEvaluatedService returns a service where an evaluation has been executed against all templated properties.
func (*Server) GetHostPublicKey ¶
Return host's public key
func (*Server) GetISvcsHealth ¶
func (s *Server) GetISvcsHealth(IServiceNames []string, results *[]isvcs.IServiceHealthResult) error
GetISvcsHealth returns health status for a list of isvcs
func (*Server) GetPoolIPs ¶
GetPoolIPs gets all ips available to a pool
func (*Server) GetResourcePool ¶
func (s *Server) GetResourcePool(poolID string, reply *pool.ResourcePool) error
GetResourcePool gets the pool
func (*Server) GetResourcePools ¶
func (s *Server) GetResourcePools(empty struct{}, poolsReply *[]pool.ResourcePool) error
GetResourcePools returns all ResourcePools
func (*Server) GetService ¶
Get a specific service
func (*Server) GetServiceDetails ¶
func (s *Server) GetServiceDetails(serviceID string, response *service.ServiceDetails) error
GetServiceDetails will return a ServiceDetails for the specified service
func (*Server) GetServiceDetailsByTenantID ¶
func (s *Server) GetServiceDetailsByTenantID(tenantID string, response *[]service.ServiceDetails) error
GetServiceDetailsByTenantID will return a list of ServiceDetails for the specified tenant ID
func (*Server) GetServiceEndpoints ¶
func (s *Server) GetServiceEndpoints(request *EndpointRequest, reply *[]applicationendpoint.EndpointReport) error
Get the endpoints for one or more services
func (*Server) GetServiceInstances ¶
GetServiceInstances returns all instances of a service
func (*Server) GetServiceTemplates ¶
func (s *Server) GetServiceTemplates(unused struct{}, response *map[string]servicetemplate.ServiceTemplate) error
Get a list of service templates
func (*Server) GetServicesHealth ¶
func (s *Server) GetServicesHealth(unused struct{}, results *map[string]map[int]map[string]health.HealthStatus) error
GetServicesHealth returns health checks for all services.
func (*Server) GetSystemUser ¶
Get the system user
func (*Server) GetTenantID ¶
The tenant id is the root service uuid. Walk the service tree to root to find the tenant id.
func (*Server) GetVolumeStatus ¶
GetVolumeStatus gets the volume status
func (*Server) HostsAuthenticated ¶
Given a list of hostsID return if they are authenticated
func (*Server) LocateServiceInstance ¶
func (s *Server) LocateServiceInstance(req ServiceInstanceRequest, res *service.LocationInstance) (err error)
LocateServiceInstance locates a single service instance
func (*Server) RemoveHost ¶
RemoveHost removes the host
func (*Server) RemovePublicEndpointPort ¶
func (s *Server) RemovePublicEndpointPort(request *PublicEndpointRequest, _ *struct{}) error
Remove a port public endpoint from a service.
func (*Server) RemovePublicEndpointVHost ¶
func (s *Server) RemovePublicEndpointVHost(request *PublicEndpointRequest, _ *struct{}) error
Remove a vhost public endpoint from a service.
func (*Server) RemoveResourcePool ¶
RemoveResourcePool removes the pool
func (*Server) RemoveServiceTemplate ¶
Remove a service template
func (*Server) RemoveVirtualIP ¶
RemoveVirtualIP removes a specific virtual IP from a pool
func (*Server) ReportHealthStatus ¶
func (s *Server) ReportHealthStatus(request HealthStatusRequest, _ *struct{}) error
ReportHealthStatus sends an update to the health check status cache.
func (*Server) ReportInstanceDead ¶
func (s *Server) ReportInstanceDead(request ReportDeadInstanceRequest, _ *struct{}) error
ReportInstanceDead removes stopped instances from the health check status cache.
func (*Server) ResetHostKey ¶
Reset and return host's private key
func (*Server) ResetRegistry ¶
ResetRegistry pulls from the configured docker registry and updates the index.
func (*Server) ResolveServicePath ¶
func (s *Server) ResolveServicePath(request ResolveServiceRequest, response *[]service.ServiceDetails) error
ResolveServicePath resolves a service path (e.g., "infrastructure/mariadb") to zero or more ServiceDetails.
func (*Server) SendDockerAction ¶
func (s *Server) SendDockerAction(req DockerActionRequest, unused *string) (err error)
SendDockerAction submits an action to a docker container
func (*Server) ServiceUse ¶
func (s *Server) ServiceUse(request *ServiceUseRequest, response *string) error
Use a new image for a given service - this will pull the image and tag it
func (*Server) SetIPs ¶
func (s *Server) SetIPs(request addressassignment.AssignmentRequest, unused *string) error
func (*Server) StopServiceInstance ¶
func (s *Server) StopServiceInstance(req ServiceInstanceRequest, unused *string) (err error)
StopServiceInstance stops a single service instance
func (*Server) SyncRegistry ¶
SyncRegistry prompts the master to repush all images in the index into the docker registry.
func (*Server) UpdateHost ¶
UpdateHost updates the host
func (*Server) UpdateResourcePool ¶
func (s *Server) UpdateResourcePool(pool pool.ResourcePool, _ *struct{}) error
UpdateResourcePool updates the pool
func (*Server) UpgradeRegistry ¶
func (s *Server) UpgradeRegistry(req UpgradeDockerRequest, reply *int) error
UpgradeRegistry migrates docker registry images from an older or remote docker registry.
func (*Server) ValidateCredentials ¶
Validate the credentials of the specified user
func (*Server) WaitService ¶
func (s *Server) WaitService(request *WaitServiceRequest, throwaway *string) error
Wait on specified services to be in the given state
type ServiceInstanceRequest ¶
type ServiceUseRequest ¶
type UpgradeDockerRequest ¶
UpgradeDockerRequest are options for upgrading/migrating the docker registry.
type WaitServiceRequest ¶
Source Files ¶
- client.go
- debug_client.go
- debug_server.go
- docker_client.go
- docker_server.go
- endpoint_client.go
- endpoint_server.go
- health_client.go
- health_server.go
- hosts_client.go
- hosts_server.go
- instance_client.go
- instance_server.go
- interface.go
- pool_client.go
- pool_server.go
- publicendpoint_client.go
- publicendpoint_server.go
- server.go
- service_client.go
- service_server.go
- servicetemplate_client.go
- servicetemplate_master.go
- user_client.go
- user_server.go
- volume_client.go
- volume_server.go