util

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAbortStream = errors.New("abort message stream")

Functions

This section is empty.

Types

type ClientStreamCloser

type ClientStreamCloser func() (ResponseMessage, error)

type RequestMessage added in v0.27.0

type RequestMessage interface {
	GetMetaHeader() *session.RequestMetaHeader
}

type RequestMessageStreamer

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

func (*RequestMessageStreamer) CloseAndRecv

func (s *RequestMessageStreamer) CloseAndRecv() (ResponseMessage, error)

func (*RequestMessageStreamer) Send

func (s *RequestMessageStreamer) Send(req any) error

type RequestMessageWriter

type RequestMessageWriter func(any) error

type ResponseConstructor added in v0.27.0

type ResponseConstructor func() ResponseMessage

type ResponseMessage

type ResponseMessage interface {
	GetMetaHeader() *session.ResponseMetaHeader
	SetMetaHeader(*session.ResponseMetaHeader)
}

ResponseMessage is an interface of NeoFS response message.

type ResponseMessageReader

type ResponseMessageReader func() (ResponseMessage, error)

type ResponseMessageWriter added in v0.13.0

type ResponseMessageWriter func(ResponseMessage) error

type ServerStream added in v0.13.0

type ServerStream interface {
	Context() context.Context
}

ServerStream is an interface of server-side stream v2.

type ServerStreamHandler

type ServerStreamHandler func(context.Context, any) (ResponseMessageReader, error)

type SignService

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

func NewUnarySignService

func NewUnarySignService(key *ecdsa.PrivateKey) *SignService

func (*SignService) CreateRequestStreamer

func (s *SignService) CreateRequestStreamer(sender RequestMessageWriter, closer ClientStreamCloser, blankResp ResponseConstructor) *RequestMessageStreamer

func (*SignService) HandleServerStreamRequest

func (s *SignService) HandleServerStreamRequest(
	req any,
	respWriter ResponseMessageWriter,
	blankResp ResponseConstructor,
	respWriterCaller func(ResponseMessageWriter) error,
) error

func (*SignService) HandleUnaryRequest

func (s *SignService) HandleUnaryRequest(ctx context.Context, req any, handler UnaryHandler, blankResp ResponseConstructor) (ResponseMessage, error)

type UnaryHandler

type UnaryHandler func(context.Context, any) (ResponseMessage, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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