github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/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  }
    18  
    19  func (s *System) ReconcileSummaries() error {
    20  	var req struct{}
    21  	_, err := s.client.write("/v1/system/reconcile/summaries", &req, nil, nil)
    22  	return err
    23  }