github.com/jrxfive/nomad@v0.6.1-0.20170802162750-1fef470e89bf/api/system.go (about)

     1  package api
     2  
     3  // Status is used to query the status-related endpoints.
     4  type System struct {
     5  	client *Client
     6  }
     7  
     8  // System returns a handle on the system endpoints.
     9  func (c *Client) System() *System {
    10  	return &System{client: c}
    11  }
    12  
    13  func (s *System) GarbageCollect() error {
    14  	var req struct{}
    15  	_, err := s.client.write("/v1/system/gc", &req, nil, nil)
    16  	return err
    17  }