api

package
v0.0.0-...-009cb35 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrorResponse

type ErrorResponse struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type SDServer

type SDServer struct {
	// contains filtered or unexported fields
}

func NewSDServer

func NewSDServer(db *bolt.DB) *SDServer

func (*SDServer) CreateTargetGroupHandler

func (sd *SDServer) CreateTargetGroupHandler(w http.ResponseWriter, req *http.Request)

createTargetGroupHandler POST /api/v1/target/ creates a new target group

func (*SDServer) DeleteTargetGroupHandler

func (sd *SDServer) DeleteTargetGroupHandler(w http.ResponseWriter, req *http.Request)

DELETE /api/v1/target/<target_group_id> # deletes a target group in a target group

func (*SDServer) DeleteTargetGroupLabelHandler

func (sd *SDServer) DeleteTargetGroupLabelHandler(w http.ResponseWriter, req *http.Request)

DELTE /api/v1/target/<target_group_id>/label/<label_key> # deletes a label in a target group

func (*SDServer) DeleteTargetGroupTargetHandler

func (sd *SDServer) DeleteTargetGroupTargetHandler(w http.ResponseWriter, req *http.Request)

DELETE /api/v1/target/<target_group_id>/server/<server_addr> # deletes a server in a target group

func (*SDServer) DiscoverHandler

func (sd *SDServer) DiscoverHandler(w http.ResponseWriter, req *http.Request)

func (*SDServer) GetAllTargetGroupsHandler

func (sd *SDServer) GetAllTargetGroupsHandler(w http.ResponseWriter, req *http.Request)

GET /api/v1/target/ return targets list

func (*SDServer) GetTargetGroupHandler

func (sd *SDServer) GetTargetGroupHandler(w http.ResponseWriter, req *http.Request)

func (*SDServer) PatchTargetGroupLabelHandler

func (sd *SDServer) PatchTargetGroupLabelHandler(w http.ResponseWriter, req *http.Request)

PATCH /api/v1/target/<target_group_id>/label/<label_key> # updates a label in a target group

func (*SDServer) PutTargetGroupHandler

func (sd *SDServer) PutTargetGroupHandler(w http.ResponseWriter, req *http.Request)

Jump to

Keyboard shortcuts

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