handlers

package
v0.0.0-...-d31e6af Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToJSON

func ToJSON(i interface{}, w io.Writer) error

ToJSON serializes the given interface into a string based JSON format

Types

type HTTP

type HTTP struct {
	Host           string       ` json:"host"`
	Name           string       ` json:"name"`
	Stype          string       ` json:"stype"`
	AcceptedStatus map[int]bool ` json:"accepted_status"`
	Frequency      float64      ` json:"frequency"`
	RequestMethod  string       ` json:"request_method"`
	RequestPayload string       ` json:"request_payload"`
	RequestHeaders [][2]string  ` json:"request_headers"`
}

type Response

type Response struct {
	Status bool
	Time   string
}

type Services

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

func NewServices

func NewServices(c proto.ServiceClient) *Services

func (*Services) AddService

func (s *Services) AddService(w http.ResponseWriter, r *http.Request)

func (*Services) GetService

func (s *Services) GetService(w http.ResponseWriter, r *http.Request)

func (*Services) GetServices

func (s *Services) GetServices(w http.ResponseWriter, r *http.Request)

func (*Services) GetStatus

func (s *Services) GetStatus(w http.ResponseWriter, r *http.Request)

func (*Services) Index

func (s *Services) Index(w http.ResponseWriter, r *http.Request)

func (*Services) RemoveService

func (s *Services) RemoveService(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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