correlation

package
v1.1.53 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CorrelationService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "amplify.agent.correlation.CorrelationService",
	HandlerType: (*CorrelationServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetResourceContext",
			Handler:    _CorrelationService_GetResourceContext_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "correlation/correlation.proto",
}

CorrelationService_ServiceDesc is the grpc.ServiceDesc for CorrelationService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_correlation_correlation_proto protoreflect.FileDescriptor

Functions

func RegisterCorrelationServiceServer

func RegisterCorrelationServiceServer(s grpc.ServiceRegistrar, srv CorrelationServiceServer)

Types

type CorrelationServiceClient

type CorrelationServiceClient interface {
	GetResourceContext(ctx context.Context, in *TransactionContext, opts ...grpc.CallOption) (*ResourceContext, error)
}

CorrelationServiceClient is the client API for CorrelationService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CorrelationServiceServer

type CorrelationServiceServer interface {
	GetResourceContext(context.Context, *TransactionContext) (*ResourceContext, error)
	// contains filtered or unexported methods
}

CorrelationServiceServer is the server API for CorrelationService service. All implementations must embed UnimplementedCorrelationServiceServer for forward compatibility

type Request

type Request struct {

	// HTTP request method
	Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
	// The request protocol scheme
	Protocol string `protobuf:"bytes,2,opt,name=protocol,proto3" json:"protocol,omitempty"`
	// The request protocol scheme version
	ProtocolVersion string `protobuf:"bytes,3,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// The value of Authority/Host request header
	Authority string `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty"`
	// The port of incoming request
	Port uint32 `protobuf:"varint,5,opt,name=port,proto3" json:"port,omitempty"`
	// The request URI
	Path string `protobuf:"bytes,6,opt,name=path,proto3" json:"path,omitempty"`
	// The request URI as received by dataplane gateway
	OriginalPath string `protobuf:"bytes,7,opt,name=original_path,json=originalPath,proto3" json:"original_path,omitempty"`
	// The value of User-Agent request header
	UserAgent string `protobuf:"bytes,8,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"`
	// The value of Referer request header
	Referer string `protobuf:"bytes,9,opt,name=referer,proto3" json:"referer,omitempty"`
	// The value of X-Forwarded-For request header
	ForwardedFor string `protobuf:"bytes,10,opt,name=forwarded_for,json=forwardedFor,proto3" json:"forwarded_for,omitempty"`
	// The map of request headers
	Headers map[string]string `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

Request - represents the API request properties

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetAuthority

func (x *Request) GetAuthority() string

func (*Request) GetForwardedFor

func (x *Request) GetForwardedFor() string

func (*Request) GetHeaders

func (x *Request) GetHeaders() map[string]string

func (*Request) GetMethod

func (x *Request) GetMethod() string

func (*Request) GetOriginalPath

func (x *Request) GetOriginalPath() string

func (*Request) GetPath

func (x *Request) GetPath() string

func (*Request) GetPort

func (x *Request) GetPort() uint32

func (*Request) GetProtocol

func (x *Request) GetProtocol() string

func (*Request) GetProtocolVersion

func (x *Request) GetProtocolVersion() string

func (*Request) GetReferer

func (x *Request) GetReferer() string

func (*Request) GetUserAgent

func (x *Request) GetUserAgent() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type ResourceContext

type ResourceContext struct {

	// The dataplane gateway specific identifier used for correlating
	// the API service resource
	ApiId string `protobuf:"bytes,1,opt,name=api_id,json=apiId,proto3" json:"api_id,omitempty"`
	// The dataplane gateway specific deployment stage name used for
	// correlating the API service resource
	Stage string `protobuf:"bytes,2,opt,name=stage,proto3" json:"stage,omitempty"`
	// The dataplane gateway specific version identifier used for
	// correlating the API service resource
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// The dataplane gateway specific identifier used for correlating
	// the Amplify marketplace subscription/application
	ConsumerId string `protobuf:"bytes,4,opt,name=consumer_id,json=consumerId,proto3" json:"consumer_id,omitempty"`
	// contains filtered or unexported fields
}

ResourceContext - holds the properties that correlates the transaction with Amplify API resources.

func (*ResourceContext) Descriptor deprecated

func (*ResourceContext) Descriptor() ([]byte, []int)

Deprecated: Use ResourceContext.ProtoReflect.Descriptor instead.

func (*ResourceContext) GetApiId

func (x *ResourceContext) GetApiId() string

func (*ResourceContext) GetConsumerId

func (x *ResourceContext) GetConsumerId() string

func (*ResourceContext) GetStage

func (x *ResourceContext) GetStage() string

func (*ResourceContext) GetVersion

func (x *ResourceContext) GetVersion() string

func (*ResourceContext) ProtoMessage

func (*ResourceContext) ProtoMessage()

func (*ResourceContext) ProtoReflect

func (x *ResourceContext) ProtoReflect() protoreflect.Message

func (*ResourceContext) Reset

func (x *ResourceContext) Reset()

func (*ResourceContext) String

func (x *ResourceContext) String() string

type Response

type Response struct {

	// The HTTP response code
	ResponseCode uint32 `protobuf:"varint,1,opt,name=response_code,json=responseCode,proto3" json:"response_code,omitempty"`
	// The map of response headers
	Headers map[string]string `` /* 155-byte string literal not displayed */
	// contains filtered or unexported fields
}

Response - represents the API response properties

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetHeaders

func (x *Response) GetHeaders() map[string]string

func (*Response) GetResponseCode

func (x *Response) GetResponseCode() uint32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type TransactionContext

type TransactionContext struct {

	// The request/transaction identifier
	TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"`
	// The source address on which the request from the user was received
	OriginAddress string `protobuf:"bytes,2,opt,name=originAddress,proto3" json:"originAddress,omitempty"`
	// The alias name for the source address
	OriginAlias string `protobuf:"bytes,3,opt,name=originAlias,proto3" json:"originAlias,omitempty"`
	// The destination address on which the request from the user was received
	DestinationAddress string `protobuf:"bytes,4,opt,name=destinationAddress,proto3" json:"destinationAddress,omitempty"`
	// The alias name for the destination address
	DestinationAlias string `protobuf:"bytes,5,opt,name=destinationAlias,proto3" json:"destinationAlias,omitempty"`
	// The name of the routing rule defined for dataplane gateway
	RouteName string `protobuf:"bytes,6,opt,name=routeName,proto3" json:"routeName,omitempty"`
	// The map of additional metadata associated to the traffic
	// for specific dataplane gateway
	Metadata map[string]*structpb.Value `` /* 157-byte string literal not displayed */
	// The response properties associated with the API transaction
	Request *Request `protobuf:"bytes,8,opt,name=request,proto3" json:"request,omitempty"`
	// The response properties associated with the API transaction
	Response *Response `protobuf:"bytes,9,opt,name=response,proto3" json:"response,omitempty"`
	// The time request was received by the dataplane gateway
	StartTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// contains filtered or unexported fields
}

TransactionContext - represents the API traffic transaction context

func (*TransactionContext) Descriptor deprecated

func (*TransactionContext) Descriptor() ([]byte, []int)

Deprecated: Use TransactionContext.ProtoReflect.Descriptor instead.

func (*TransactionContext) GetDestinationAddress

func (x *TransactionContext) GetDestinationAddress() string

func (*TransactionContext) GetDestinationAlias

func (x *TransactionContext) GetDestinationAlias() string

func (*TransactionContext) GetMetadata

func (x *TransactionContext) GetMetadata() map[string]*structpb.Value

func (*TransactionContext) GetOriginAddress

func (x *TransactionContext) GetOriginAddress() string

func (*TransactionContext) GetOriginAlias

func (x *TransactionContext) GetOriginAlias() string

func (*TransactionContext) GetRequest

func (x *TransactionContext) GetRequest() *Request

func (*TransactionContext) GetResponse

func (x *TransactionContext) GetResponse() *Response

func (*TransactionContext) GetRouteName

func (x *TransactionContext) GetRouteName() string

func (*TransactionContext) GetStartTime

func (x *TransactionContext) GetStartTime() *timestamppb.Timestamp

func (*TransactionContext) GetTransactionId

func (x *TransactionContext) GetTransactionId() string

func (*TransactionContext) ProtoMessage

func (*TransactionContext) ProtoMessage()

func (*TransactionContext) ProtoReflect

func (x *TransactionContext) ProtoReflect() protoreflect.Message

func (*TransactionContext) Reset

func (x *TransactionContext) Reset()

func (*TransactionContext) String

func (x *TransactionContext) String() string

type UnimplementedCorrelationServiceServer

type UnimplementedCorrelationServiceServer struct {
}

UnimplementedCorrelationServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCorrelationServiceServer) GetResourceContext

type UnsafeCorrelationServiceServer

type UnsafeCorrelationServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeCorrelationServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CorrelationServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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