rest

package
v0.0.0-...-2685bbd Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 21 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
}

Server wraps the rest endpoints using endpointer

func New

func New(grpcHost string, manager *manager.Manager) (s *Server, err error)

New creates a new Rest instance

func (*Server) Close

func (s *Server) Close(ctx context.Context) (err error)

Close closes the rest server

func (*Server) GetEndpoint

func (s *Server) GetEndpoint(ctx context.Context) (endpoint *pb.Endpoint, err error)

GetEndpoint returns an endpoint

func (*Server) Listen

func (s *Server) Listen(ctx context.Context, host string) (err error)

Listen lisetns for new connection details

func (*Server) SetEndpoint

func (s *Server) SetEndpoint(ctx context.Context, endpoint *pb.Endpoint) (err error)

SetEndpoint sets an endpoint

func (*Server) TemplateRead

func (s *Server) TemplateRead(ctx context.Context, path string) (resp *template.Template, err error)

TemplateRead reads a provided template

Jump to

Keyboard shortcuts

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