Documentation
¶
Index ¶
- type APICommand
- type APIService
- type Agent
- type BackendDef
- func (BackendDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (BackendDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (BackendDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (BackendDef) GetURIRoot() string
- func (BackendDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- type ListenerDef
- func (ListenerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ListenerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ListenerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ListenerDef) GetURIRoot() string
- func (ListenerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- type RouteDef
- func (RouteDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (RouteDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (RouteDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (RouteDef) GetURIRoot() string
- func (RouteDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- type ServerDef
- func (ServerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ServerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ServerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (ServerDef) GetURIRoot() string
- func (ServerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- type SpawnKillerDef
- func (SpawnKillerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnKillerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnKillerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnKillerDef) GetURIRoot() string
- func (SpawnKillerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- type SpawnListenerDef
- func (SpawnListenerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnListenerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnListenerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
- func (SpawnListenerDef) GetURIRoot() string
- func (SpawnListenerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APICommand ¶
type APICommand interface { GetURIRoot() string GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error) }
APICommand defines common functionality that web api enabled configuration services must implement
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
APIService exposes APICommand instances as REST services
func NewAPIService ¶
func NewAPIService(cmd APICommand) *APIService
NewAPIService instantiates an API service instance with the given command
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent specifies the address, handlers, and KVS used to expose commands via a REST interface
type BackendDef ¶
type BackendDef struct{}
BackendDef is used to hang the ApiCommand functions needed for exposing backend def capabilities via a REST API
var BackendDefCmd BackendDef
BackendDefCmd is the exported backend service instance used to expose an API service
func (BackendDef) DoPost ¶
func (BackendDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost interface method implementation. Method is not allowed for BackebdDef.
func (BackendDef) GetDefinition ¶
func (BackendDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition retrieves a specific backend definition
func (BackendDef) GetDefinitionList ¶
func (BackendDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList returns a list of backend definitions
func (BackendDef) GetURIRoot ¶
func (BackendDef) GetURIRoot() string
GetURIRoot returns the URI root used to serve backend def API calls
func (BackendDef) PutDefinition ¶
func (BackendDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition creates or updates a backend definition
type ListenerDef ¶
type ListenerDef struct{}
ListenerDef is used to hang the ApiCommand functions needed for exposing listener def capabilities via a REST API
var ListenerDefCmd ListenerDef
ListenerDefCmd is the interface instance used to expose as an API endpoint
func (ListenerDef) DoPost ¶
func (ListenerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost handles post requests, which are not supported for ListenerDef.
func (ListenerDef) GetDefinition ¶
func (ListenerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition retrieves a specific listener definition
func (ListenerDef) GetDefinitionList ¶
func (ListenerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList returns a list of listener definitions
func (ListenerDef) GetURIRoot ¶
func (ListenerDef) GetURIRoot() string
GetURIRoot returns the URI root used to serve listener def API calls
func (ListenerDef) PutDefinition ¶
func (ListenerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition creates or updates a listener definition
type RouteDef ¶
type RouteDef struct{}
RouteDef is used to hang the ApiCommand functions needed for exposing route def capabilities via a REST API
var RouteDefCmd RouteDef
RouteDefCmd is the RouteDef instance used to expose as an API endpoint.
func (RouteDef) DoPost ¶
func (RouteDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost handles post requests, which are not allowed for RouteDef.
func (RouteDef) GetDefinition ¶
func (RouteDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition retrieves a specific route definition
func (RouteDef) GetDefinitionList ¶
func (RouteDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList returns a list of route definitions
func (RouteDef) GetURIRoot ¶
GetURIRoot returns the URI root used to serve route def API calls
func (RouteDef) PutDefinition ¶
func (RouteDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition creates or updates a route definition
type ServerDef ¶
type ServerDef struct{}
ServerDef is used to hang the ApiCommand functions needed for exposing server def capabilities via a REST API
var ServerDefCmd ServerDef
ServerDefCmd is the ServerDef instance used to expose as an API endpoint.
func (ServerDef) DoPost ¶
func (ServerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost handles post request, which are not allowed for ServerDef.
func (ServerDef) GetDefinition ¶
func (ServerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition retrieves a specific server definition
func (ServerDef) GetDefinitionList ¶
func (ServerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList returns a list of server definitions
func (ServerDef) GetURIRoot ¶
GetURIRoot returns the URI root used to serve server def API calls
func (ServerDef) PutDefinition ¶
func (ServerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition creates or updates a server definition
type SpawnKillerDef ¶
type SpawnKillerDef struct{}
SpawnKillerDef is used to hang the ApiCommand functions needed for killing spawned processes via a REST API
var SpawnKillerDefCmd SpawnKillerDef
SpawnKillerDefCmd is the SpawnKillerDef instance used to expose as an API endpoint.
func (SpawnKillerDef) DoPost ¶
func (SpawnKillerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost handles post requests, which are used to spawn new listener instances. This service is intended to support testability, and will likely not be exposed in production configurations.
func (SpawnKillerDef) GetDefinition ¶
func (SpawnKillerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition is not implemented for spawn killer
func (SpawnKillerDef) GetDefinitionList ¶
func (SpawnKillerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList is not implemented for spawn killer
func (SpawnKillerDef) GetURIRoot ¶
func (SpawnKillerDef) GetURIRoot() string
GetURIRoot returns the URI root used to kill spawn xavi listeners
func (SpawnKillerDef) PutDefinition ¶
func (SpawnKillerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition is not implemented for spawn killer
type SpawnListenerDef ¶
type SpawnListenerDef struct{}
SpawnListenerDef is used to hang the ApiCommand functions needed for spawning xavi instances
var SpawnListenerDefCmd SpawnListenerDef
SpawnListenerDefCmd is the SpawnKillerDef instance used to expose as an API endpoint.
func (SpawnListenerDef) DoPost ¶
func (SpawnListenerDef) DoPost(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
DoPost spawns the xavi listener as specified by the payload
func (SpawnListenerDef) GetDefinition ¶
func (SpawnListenerDef) GetDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinition is not provided for spawning
func (SpawnListenerDef) GetDefinitionList ¶
func (SpawnListenerDef) GetDefinitionList(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
GetDefinitionList is not provided for spawning
func (SpawnListenerDef) GetURIRoot ¶
func (SpawnListenerDef) GetURIRoot() string
GetURIRoot returns the URI root used to spawn listeners
func (SpawnListenerDef) PutDefinition ¶
func (SpawnListenerDef) PutDefinition(kvs kvstore.KVStore, resp http.ResponseWriter, req *http.Request) (interface{}, error)
PutDefinition not provided for spawning