types

package
v1.67.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0, BSD-3-Clause, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerOperation

type HandlerOperation struct {
	dyngo.Operation
	Error error
	trace.TagsHolder
	trace.SecurityEventsHolder
}

HandlerOperation represents a gRPC server handler operation. It must be created with StartHandlerOperation() and finished with its Finish() method. Security events observed during the operation lifetime should be added to the operation using its AddSecurityEvent() method.

func (*HandlerOperation) Finish

func (op *HandlerOperation) Finish(res HandlerOperationRes) []any

Finish the gRPC handler operation, along with the given results, and emit a finish event up in the operation stack.

type HandlerOperationArgs

type HandlerOperationArgs struct {
	// Method is the gRPC method name.
	// Corresponds to the address `grpc.server.method`.
	Method string

	// RPC metadata received by the gRPC handler.
	// Corresponds to the address `grpc.server.request.metadata`.
	Metadata map[string][]string

	// ClientIP is the IP address of the client that initiated the gRPC request.
	// Corresponds to the address `http.client_ip`.
	ClientIP netip.Addr
}

HandlerOperationArgs is the grpc handler arguments.

func (HandlerOperationArgs) IsArgOf

type HandlerOperationRes

type HandlerOperationRes struct{}

HandlerOperationRes is the grpc handler results. Empty as of today.

func (HandlerOperationRes) IsResultOf

type ReceiveOperation

type ReceiveOperation struct {
	dyngo.Operation
}

ReceiveOperation type representing an gRPC server handler operation. It must be created with StartReceiveOperation() and finished with its Finish().

func (ReceiveOperation) Finish

func (op ReceiveOperation) Finish(res ReceiveOperationRes)

Finish the gRPC handler operation, along with the given results, and emits a finish event up in the operation stack.

type ReceiveOperationArgs

type ReceiveOperationArgs struct{}

ReceiveOperationArgs is the gRPC handler receive operation arguments Empty as of today.

func (ReceiveOperationArgs) IsArgOf

type ReceiveOperationRes

type ReceiveOperationRes struct {
	// Message received by the gRPC handler.
	// Corresponds to the address `grpc.server.request.message`.
	Message interface{}
}

ReceiveOperationRes is the gRPC handler receive operation results which contains the message the gRPC handler received.

func (ReceiveOperationRes) IsResultOf

Jump to

Keyboard shortcuts

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