services

package
v1.0.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2020 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List makes a request against the API to list services.

Types

type Service

type Service struct {
	// The binary name of the service.
	Binary string `json:"binary"`

	// The reason for disabling a service.
	DisabledReason string `json:"disabled_reason"`

	// The name of the host.
	Host string `json:"host"`

	// The id of the service.
	ID int `json:"id"`

	// The state of the service. One of up or down.
	State string `json:"state"`

	// The status of the service. One of enabled or disabled.
	Status string `json:"status"`

	// The date and time when the resource was updated.
	UpdatedAt time.Time `json:"-"`

	// The availability zone name.
	Zone string `json:"zone"`
}

Service represents a Compute service in the OpenStack cloud.

func ExtractServices

func ExtractServices(r pagination.Page) ([]Service, error)

func (*Service) UnmarshalJSON

func (r *Service) UnmarshalJSON(b []byte) error

UnmarshalJSON to override default

type ServicePage

type ServicePage struct {
	pagination.SinglePageBase
}

ServicePage represents a single page of all Services from a List request.

func (ServicePage) IsEmpty

func (page ServicePage) IsEmpty() (bool, error)

IsEmpty determines whether or not a page of Services contains any results.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL