http

package
v0.0.0-...-5642128 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(s *store.Store) (*Server, error)

New creates a Server instance with given raft store.

func (*Server) Handler

func (s *Server) Handler(ctx *fasthttp.RequestCtx)

Handler handles HTTP requests in the following way:

  • POST = Create entry, key is the request URI so 'localhost:0/testkey' key = "testkey" and the body of the request will be the key-value pair's value.

  • GET = Same thing with keys, but the value will be written as a response.

Jump to

Keyboard shortcuts

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