api

package
v0.0.0-...-8b2ef79 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2017 License: Apache-2.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeObject

type NodeObject struct {
	Name    string    `json:"name"`
	Thing1  string    `json:"thing1"`
	Thing2  string    `json:"thing2"`
	Numbers int       `json:"numbers"`
	Time    time.Time `json:"time"`
}

NodeObject is a object struct

type Server

type Server struct {
	Address string
	Port    int
	Store   regStore.Registry
}

Server is the proxy server struct

func NewServer

func NewServer(endpointIP, serviceName, datacenter, backendAddr string, backend regStore.Backend, endpointPort int) (*Server, error)

NewServer initializes a new Server

func (*Server) HandleServeArray

func (e *Server) HandleServeArray(w http.ResponseWriter, r *http.Request)

HandleServeArray serves an array back to the Http Endpoint

func (*Server) HandleServeObject

func (e *Server) HandleServeObject(w http.ResponseWriter, r *http.Request)

HandleServeObject serves an object back to the Http Endpint

func (*Server) HandleTest

func (e *Server) HandleTest(w http.ResponseWriter, r *http.Request)

HandleTest is....well a test

func (*Server) Register

func (e *Server) Register(datacenter, serviceName string)

Register is...

func (*Server) Serve

func (e *Server) Serve()

Serve starts the Server on address:port and handles the routes

Jump to

Keyboard shortcuts

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