Skip to content

Commit

Permalink
Update tornjak api to have versioning (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
maia-iyer authored Jul 12, 2024
2 parents 65cbbe6 + 61b71f8 commit feea00b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions api/agent/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,20 @@ func (s *Server) GetRouter() http.Handler {
apiRtr.HandleFunc("/api/tornjak/clusters/edit", s.clusterEdit)
apiRtr.HandleFunc("/api/tornjak/clusters/delete", s.clusterDelete)

// Tornjak specific
apiRtr.HandleFunc("/api/v1/tornjak/serverinfo", s.tornjakGetServerInfo)
// Agents Selectors
apiRtr.HandleFunc("/api/v1/tornjak/selectors/register", s.tornjakPluginDefine)
apiRtr.HandleFunc("/api/v1/tornjak/selectors/list", s.tornjakSelectorsList)
apiRtr.HandleFunc("/api/v1/tornjak/agents/list", s.tornjakAgentsList)
// Clusters
apiRtr.HandleFunc("/api/v1/tornjak/clusters/list", s.clusterList)
apiRtr.HandleFunc("/api/v1/tornjak/clusters/create", s.clusterCreate)
apiRtr.HandleFunc("/api/v1/tornjak/clusters/edit", s.clusterEdit)
apiRtr.HandleFunc("/api/v1/tornjak/clusters/delete", s.clusterDelete)



// Middleware
apiRtr.Use(s.verificationMiddleware)

Expand Down

0 comments on commit feea00b

Please sign in to comment.