Documentation ¶
Overview ¶
Package mockserver provides Graylog API mock server.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server represents a mock of the Graylog API. Server embeds the Logic, so please see the document about Logic also. https://godoc.org/github.com/suzuki-shunsuke/go-graylog/mockserver/logic
func NewServer ¶
NewServer returns new Server but doesn't start it. The argument `addr` is the port number which the server uses.
server, err := mockserver.NewServer(":8000", nil)
If addr is an empty string, the free port is assigned automatially. The argument `store` is the store which the server uses. If `store` is nil, the default plain store is used and data is not persisted. To start the server, call the Start method.
server.Start() defer server.Close()
func (*Server) Close ¶
func (ms *Server) Close()
Close shuts down the server and blocks until all outstanding requests on this server have completed.
Directories ¶
Path | Synopsis |
---|---|
Run Graylog mock server.
|
Run Graylog mock server. |
Package handler provides handlers of Graylog API mock server.
|
Package handler provides handlers of Graylog API mock server. |
Package logic provides logic layers of Graylog API mock server.
|
Package logic provides logic layers of Graylog API mock server. |
Package store provides store interface for Graylog API mock server.
|
Package store provides store interface for Graylog API mock server. |
plain
Package plain provides the implementation of store.Store interface.
|
Package plain provides the implementation of store.Store interface. |