Skip to content

Commit

Permalink
grpc outgoing event
Browse files Browse the repository at this point in the history
  • Loading branch information
shivam-srivastava28 committed Feb 28, 2024
1 parent 923df99 commit 4c5f45a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions runtime/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (

const (
EventThriftOutgoing = "event-thrift-outgoing"
EventGRPCOutgoing = "event-grpc-outgoing"
EventHTTPIncoming = "event-http-incoming"
EventHTTPOutgoing = "event-http-outgoing"
)
Expand Down Expand Up @@ -62,6 +63,24 @@ func (tce *ThriftOutgoingEvent) Name() string {
return EventThriftOutgoing
}

// GRPCOutgoingEvent captures request and response data
type GRPCOutgoingEvent struct {
MethodName string
ServiceName string

ReqHeaders map[string]string
Req []byte

RspHeaders map[string]string
Rsp []byte

Success bool
}

func (gce *GRPCOutgoingEvent) Name() string {
return EventGRPCOutgoing
}

// HTTPIncomingEvent captures incoming request and response data received
type HTTPIncomingEvent struct {
EndpointName string // optional
Expand Down

0 comments on commit 4c5f45a

Please sign in to comment.