Documentation ¶
Index ¶
- func HealthCheck(w http.ResponseWriter, r *http.Request)
- func JSONError(w http.ResponseWriter, httpStatus int, err error)
- func JSONResponse(w http.ResponseWriter, httpStatus int, response any)
- type HandshakeData
- type HealthStatus
- type Networking
- func (n *Networking) HandShake(w http.ResponseWriter, r *http.Request)
- func (n *Networking) ListenAndServe(address, port string) error
- func (n *Networking) PreHandShake(response http.ResponseWriter, request *http.Request) (*HandshakeData, bool)
- func (n *Networking) ReadyCheck(w http.ResponseWriter, r *http.Request)
- type ReadyStatus
- type SuccessfulHandshakeData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HealthCheck ¶ added in v0.3.0
func HealthCheck(w http.ResponseWriter, r *http.Request)
func JSONResponse ¶ added in v0.3.0
func JSONResponse(w http.ResponseWriter, httpStatus int, response any)
Types ¶
type HandshakeData ¶ added in v0.2.0
type HandshakeData struct {
// contains filtered or unexported fields
}
type HealthStatus ¶ added in v0.3.0
type HealthStatus struct {
Status string `json:"status"`
}
type Networking ¶
type Networking struct { HandshakeChan chan *SuccessfulHandshakeData // contains filtered or unexported fields }
func NewNetworking ¶
func (*Networking) HandShake ¶
func (n *Networking) HandShake(w http.ResponseWriter, r *http.Request)
func (*Networking) ListenAndServe ¶
func (n *Networking) ListenAndServe(address, port string) error
func (*Networking) PreHandShake ¶
func (n *Networking) PreHandShake(response http.ResponseWriter, request *http.Request) (*HandshakeData, bool)
PreHandShake TODO: it's "god" method needs to be simplified // antst: agree :)
func (*Networking) ReadyCheck ¶ added in v0.3.0
func (n *Networking) ReadyCheck(w http.ResponseWriter, r *http.Request)
type ReadyStatus ¶ added in v0.3.0
type SuccessfulHandshakeData ¶
Click to show internal directories.
Click to hide internal directories.