Documentation ¶
Index ¶
- Variables
- type Api
- func (a *Api) Connect(path string, header http.Header) (ws *mock.WebsocketClient)
- func (a *Api) ConnectAgent(path string, header http.Header, configs ...proto.AgentConfig) (ws *mock.WebsocketClient)
- func (a *Api) Delete(path string, header http.Header) (*http.Response, []byte, error)
- func (a *Api) DisconnectAllClients()
- func (a *Api) Get(path string, header http.Header) (*http.Response, []byte, error)
- func (a *Api) GetHost() string
- func (a *Api) GetPort() string
- func (a *Api) Post(path string, header http.Header, data []byte) (*http.Response, []byte, error)
- func (a *Api) Put(path string, header http.Header, data []byte) (*http.Response, []byte, error)
- func (a *Api) Start() (err error)
- func (a *Api) StartPost(path string, header http.Header, data []byte) chan Response
- func (a *Api) StartPut(path string, header http.Header, data []byte) chan Response
- func (a *Api) Stop()
- type ApiService
- type Response
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStartFailed = errors.New("failed to start API")
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) ConnectAgent ¶
func (a *Api) ConnectAgent(path string, header http.Header, configs ...proto.AgentConfig) (ws *mock.WebsocketClient)
func (*Api) DisconnectAllClients ¶
func (a *Api) DisconnectAllClients()
type ApiService ¶
type ApiService struct {
// contains filtered or unexported fields
}
func NewApiService ¶
func NewApiService() *ApiService
func (*ApiService) DisconnectAllClients ¶
func (a *ApiService) DisconnectAllClients()
func (*ApiService) StopAllApi ¶
func (a *ApiService) StopAllApi()
func (*ApiService) StopApi ¶
func (a *ApiService) StopApi(host string, port string)
Click to show internal directories.
Click to hide internal directories.