github.com/go-chef/chef@v0.30.1/status.go (about)

     1  package chef
     2  
     3  type StatusService struct {
     4  	client *Client
     5  }
     6  
     7  // Status represents the body of the returned information.
     8  type Status struct {
     9  	Status    string            `json:"status"`
    10  	Upstreams map[string]string `json:"upstreams"`
    11  	Keygen    map[string]int    `json:"keygen"`
    12  }
    13  
    14  // Status gets the frontend & backend server information.
    15  //
    16  // https://docs.chef.io/api_chef_server/#_status
    17  func (e *StatusService) Get() (data Status, err error) {
    18  	err = e.client.magicRequestDecoder("GET", "_status", nil, &data)
    19  	return
    20  }