connect

package
v5.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2022 License: BSD-2-Clause, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Request

type Request struct {
	Net    connect.Connection
	Rng    csprng.Source
	E2eGrp *cyclic.Group
}

Request allows for making REST-like requests to a RestServer using connect.Connection Can be used as stateful or declared inline without state

func (*Request) AsyncRequest

func (s *Request) AsyncRequest(method restlike.Method, path restlike.URI,
	content restlike.Data, headers *restlike.Headers, cb restlike.RequestCallback, e2eParams e2e.Params) error

AsyncRequest provides several Method of sending Data to the given URI and will return the Message to the given Callback when received

func (*Request) Request

func (s *Request) Request(method restlike.Method, path restlike.URI,
	content restlike.Data, headers *restlike.Headers, e2eParams e2e.Params) (*restlike.Message, error)

Request provides several Method of sending Data to the given URI and blocks until the Message is returned

type Server

type Server struct {
	ConnectServer *connect.ConnectionServer
	// contains filtered or unexported fields
}

Server implements the RestServer interface using connect.Connection

func NewServer

func NewServer(identity xxdk.ReceptionIdentity, net *xxdk.Cmix,
	p xxdk.E2EParams, clParams connect.ConnectionListParams) (*Server, error)

NewServer builds a RestServer with connect.Connection and the provided arguments, then registers necessary external services

func (*Server) Close

func (c *Server) Close()

Close the internal RestServer endpoints and external services

func (*Server) GetEndpoints

func (c *Server) GetEndpoints() *restlike.Endpoints

GetEndpoints returns the association of a Callback with a specific URI and a variety of different REST Method

Jump to

Keyboard shortcuts

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