web

package
v0.0.0-...-280633d Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port int
}

Config is the configuration for creating a Server instance.

type Server

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

Server is a server that processes the web requested such as authentication webhook.

func NewServer

func NewServer(conf *Config, db database.Database, yorkieConf *yorkie.Config) (*Server, error)

NewServer creates a new instance of Server.

func (*Server) GracefulStop

func (s *Server) GracefulStop()

GracefulStop stops the server gracefully.

func (*Server) HandleAuth

func (s *Server) HandleAuth(w http.ResponseWriter, r *http.Request)

HandleAuth handles the given authorization webhook request.

func (*Server) Start

func (s *Server) Start() error

Start starts to handle requests on incoming connections.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server. It immediately closes all open connections and listeners.

Jump to

Keyboard shortcuts

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