Documentation
¶
Overview ¶
Package rpc implements handlers for incoming Secure Scuttlebutt RPC requests.
Index ¶
- Constants
- func NewMuxClosingHandlers(createHistoryStream *HandlerCreateHistoryStream) []mux.SynchronousHandler
- func NewMuxHandlers(blobsGet *HandlerBlobsGet, blobsCreateWants *HandlerBlobsCreateWants, ...) []mux.Handler
- type AcceptTunnelConnectHandler
- type CreateHistoryStreamQueryHandler
- type CreateHistoryStreamResponseWriter
- type CreateWantsCommandHandler
- type EbtReplicateCommandHandler
- type GetBlobQueryHandler
- type HandlerBlobsCreateWants
- type HandlerBlobsGet
- type HandlerCreateHistoryStream
- type HandlerEbtReplicate
- type HandlerTunnelConnect
Constants ¶
View Source
const ( // MaxBlobChunkSizeInBytes specifies the max size of one response payload // when sending blobs. Larger blobs are broken into several payloads. This // is done to give other pieces of code some wire time and avoid blocking // the connection completely when sending the blob. MaxBlobChunkSizeInBytes = 100 * 1000 )
Variables ¶
This section is empty.
Functions ¶
func NewMuxClosingHandlers ¶
func NewMuxClosingHandlers( createHistoryStream *HandlerCreateHistoryStream, ) []mux.SynchronousHandler
NewMuxClosingHandlers is a convenience function used to create a list of all handlers implemented by this program.
func NewMuxHandlers ¶
func NewMuxHandlers( blobsGet *HandlerBlobsGet, blobsCreateWants *HandlerBlobsCreateWants, ebtReplicate *HandlerEbtReplicate, tunnelConnect *HandlerTunnelConnect, ) []mux.Handler
NewMuxHandlers is a convenience function used to create a list of all handlers implemented by this program.
Types ¶
type AcceptTunnelConnectHandler ¶
type AcceptTunnelConnectHandler interface {
Handle(ctx context.Context, cmd commands.AcceptTunnelConnect) error
}
type CreateHistoryStreamQueryHandler ¶
type CreateHistoryStreamQueryHandler interface {
Handle(ctx context.Context, query queries.CreateHistoryStream)
}
CreateHistoryStreamQueryHandler is here to make testing easier. See docs for the CreateHistoryStream application query.
type CreateHistoryStreamResponseWriter ¶
type CreateHistoryStreamResponseWriter struct {
// contains filtered or unexported fields
}
func NewCreateHistoryStreamResponseWriter ¶
func NewCreateHistoryStreamResponseWriter( args messages.CreateHistoryStreamArguments, s rpc.Stream, ) *CreateHistoryStreamResponseWriter
func (CreateHistoryStreamResponseWriter) CloseWithError ¶
func (rw CreateHistoryStreamResponseWriter) CloseWithError(err error) error
func (CreateHistoryStreamResponseWriter) WriteMessage ¶
func (rw CreateHistoryStreamResponseWriter) WriteMessage(msg message.Message) error
type CreateWantsCommandHandler ¶
type CreateWantsCommandHandler interface {
Handle(ctx context.Context, cmd commands.CreateWants) (<-chan messages.BlobWithSizeOrWantDistance, error)
}
type EbtReplicateCommandHandler ¶
type EbtReplicateCommandHandler interface {
Handle(ctx context.Context, cmd commands.HandleIncomingEbtReplicate) error
}
type GetBlobQueryHandler ¶
type GetBlobQueryHandler interface {
Handle(query queries.GetBlob) (io.ReadCloser, error)
}
type HandlerBlobsCreateWants ¶
type HandlerBlobsCreateWants struct {
// contains filtered or unexported fields
}
func NewHandlerBlobsCreateWants ¶
func NewHandlerBlobsCreateWants(handler CreateWantsCommandHandler) *HandlerBlobsCreateWants
func (HandlerBlobsCreateWants) Procedure ¶
func (h HandlerBlobsCreateWants) Procedure() rpc.Procedure
type HandlerBlobsGet ¶
type HandlerBlobsGet struct {
// contains filtered or unexported fields
}
func NewHandlerBlobsGet ¶
func NewHandlerBlobsGet(handler GetBlobQueryHandler) *HandlerBlobsGet
func (HandlerBlobsGet) Procedure ¶
func (h HandlerBlobsGet) Procedure() rpc.Procedure
type HandlerCreateHistoryStream ¶
type HandlerCreateHistoryStream struct {
// contains filtered or unexported fields
}
func NewHandlerCreateHistoryStream ¶
func NewHandlerCreateHistoryStream( q CreateHistoryStreamQueryHandler, logger logging.Logger, ) *HandlerCreateHistoryStream
func (*HandlerCreateHistoryStream) Handle ¶
func (h *HandlerCreateHistoryStream) Handle(ctx context.Context, s mux.CloserStream, req *rpc.Request)
func (*HandlerCreateHistoryStream) Procedure ¶
func (h *HandlerCreateHistoryStream) Procedure() rpc.Procedure
type HandlerEbtReplicate ¶
type HandlerEbtReplicate struct {
// contains filtered or unexported fields
}
func NewHandlerEbtReplicate ¶
func NewHandlerEbtReplicate(handler EbtReplicateCommandHandler) *HandlerEbtReplicate
func (HandlerEbtReplicate) Procedure ¶
func (h HandlerEbtReplicate) Procedure() rpc.Procedure
type HandlerTunnelConnect ¶
type HandlerTunnelConnect struct {
// contains filtered or unexported fields
}
func NewHandlerTunnelConnect ¶
func NewHandlerTunnelConnect(handler AcceptTunnelConnectHandler) *HandlerTunnelConnect
func (HandlerTunnelConnect) Procedure ¶
func (h HandlerTunnelConnect) Procedure() rpc.Procedure
Click to show internal directories.
Click to hide internal directories.