protobuf

package module
v0.0.0-...-c6689c1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SentryFlow_GetAPILog_FullMethodName       = "/protobuf.SentryFlow/GetAPILog"
	SentryFlow_GetAPIMetrics_FullMethodName   = "/protobuf.SentryFlow/GetAPIMetrics"
	SentryFlow_GetEnvoyMetrics_FullMethodName = "/protobuf.SentryFlow/GetEnvoyMetrics"
)
View Source
const (
	APIClassifier_ClassifyAPIs_FullMethodName = "/protobuf.APIClassifier/ClassifyAPIs"
)

Variables

View Source
var APIClassifier_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.APIClassifier",
	HandlerType: (*APIClassifierServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "ClassifyAPIs",
			Handler:       _APIClassifier_ClassifyAPIs_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "sentryflow_metrics.proto",
}

APIClassifier_ServiceDesc is the grpc.ServiceDesc for APIClassifier 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_sentryflow_metrics_proto protoreflect.FileDescriptor
View Source
var File_sentryflow_proto protoreflect.FileDescriptor
View Source
var SentryFlow_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "protobuf.SentryFlow",
	HandlerType: (*SentryFlowServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetAPILog",
			Handler:       _SentryFlow_GetAPILog_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetAPIMetrics",
			Handler:       _SentryFlow_GetAPIMetrics_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "GetEnvoyMetrics",
			Handler:       _SentryFlow_GetEnvoyMetrics_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "sentryflow.proto",
}

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

Functions

func RegisterAPIClassifierServer

func RegisterAPIClassifierServer(s grpc.ServiceRegistrar, srv APIClassifierServer)

func RegisterSentryFlowServer

func RegisterSentryFlowServer(s grpc.ServiceRegistrar, srv SentryFlowServer)

Types

type APIClassifierClient

type APIClassifierClient interface {
	ClassifyAPIs(ctx context.Context, opts ...grpc.CallOption) (APIClassifier_ClassifyAPIsClient, error)
}

APIClassifierClient is the client API for APIClassifier 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 APIClassifierRequest

type APIClassifierRequest struct {
	API []string `protobuf:"bytes,1,rep,name=API,proto3" json:"API,omitempty"`
	// contains filtered or unexported fields
}

func (*APIClassifierRequest) Descriptor deprecated

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

Deprecated: Use APIClassifierRequest.ProtoReflect.Descriptor instead.

func (*APIClassifierRequest) GetAPI

func (x *APIClassifierRequest) GetAPI() []string

func (*APIClassifierRequest) ProtoMessage

func (*APIClassifierRequest) ProtoMessage()

func (*APIClassifierRequest) ProtoReflect

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

func (*APIClassifierRequest) Reset

func (x *APIClassifierRequest) Reset()

func (*APIClassifierRequest) String

func (x *APIClassifierRequest) String() string

type APIClassifierResponse

type APIClassifierResponse struct {
	APIs map[string]uint64 `` /* 150-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*APIClassifierResponse) Descriptor deprecated

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

Deprecated: Use APIClassifierResponse.ProtoReflect.Descriptor instead.

func (*APIClassifierResponse) GetAPIs

func (x *APIClassifierResponse) GetAPIs() map[string]uint64

func (*APIClassifierResponse) ProtoMessage

func (*APIClassifierResponse) ProtoMessage()

func (*APIClassifierResponse) ProtoReflect

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

func (*APIClassifierResponse) Reset

func (x *APIClassifierResponse) Reset()

func (*APIClassifierResponse) String

func (x *APIClassifierResponse) String() string

type APIClassifierServer

type APIClassifierServer interface {
	ClassifyAPIs(APIClassifier_ClassifyAPIsServer) error
}

APIClassifierServer is the server API for APIClassifier service. All implementations should embed UnimplementedAPIClassifierServer for forward compatibility

type APIClassifier_ClassifyAPIsClient

type APIClassifier_ClassifyAPIsClient interface {
	Send(*APIClassifierRequest) error
	Recv() (*APIClassifierResponse, error)
	grpc.ClientStream
}

type APIClassifier_ClassifyAPIsServer

type APIClassifier_ClassifyAPIsServer interface {
	Send(*APIClassifierResponse) error
	Recv() (*APIClassifierRequest, error)
	grpc.ServerStream
}

type APILog

type APILog struct {
	Id           uint64            `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	TimeStamp    string            `protobuf:"bytes,2,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
	SrcNamespace string            `protobuf:"bytes,11,opt,name=srcNamespace,proto3" json:"srcNamespace,omitempty"`
	SrcName      string            `protobuf:"bytes,12,opt,name=srcName,proto3" json:"srcName,omitempty"`
	SrcLabel     map[string]string `` /* 158-byte string literal not displayed */
	SrcType      string            `protobuf:"bytes,21,opt,name=srcType,proto3" json:"srcType,omitempty"`
	SrcIP        string            `protobuf:"bytes,22,opt,name=srcIP,proto3" json:"srcIP,omitempty"`
	SrcPort      string            `protobuf:"bytes,23,opt,name=srcPort,proto3" json:"srcPort,omitempty"`
	DstNamespace string            `protobuf:"bytes,31,opt,name=dstNamespace,proto3" json:"dstNamespace,omitempty"`
	DstName      string            `protobuf:"bytes,32,opt,name=dstName,proto3" json:"dstName,omitempty"`
	DstLabel     map[string]string `` /* 158-byte string literal not displayed */
	DstType      string            `protobuf:"bytes,41,opt,name=dstType,proto3" json:"dstType,omitempty"`
	DstIP        string            `protobuf:"bytes,42,opt,name=dstIP,proto3" json:"dstIP,omitempty"`
	DstPort      string            `protobuf:"bytes,43,opt,name=dstPort,proto3" json:"dstPort,omitempty"`
	Protocol     string            `protobuf:"bytes,51,opt,name=protocol,proto3" json:"protocol,omitempty"`
	Method       string            `protobuf:"bytes,52,opt,name=method,proto3" json:"method,omitempty"`
	Path         string            `protobuf:"bytes,53,opt,name=path,proto3" json:"path,omitempty"`
	ResponseCode int32             `protobuf:"varint,54,opt,name=responseCode,proto3" json:"responseCode,omitempty"`
	// contains filtered or unexported fields
}

func (*APILog) Descriptor deprecated

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

Deprecated: Use APILog.ProtoReflect.Descriptor instead.

func (*APILog) GetDstIP

func (x *APILog) GetDstIP() string

func (*APILog) GetDstLabel

func (x *APILog) GetDstLabel() map[string]string

func (*APILog) GetDstName

func (x *APILog) GetDstName() string

func (*APILog) GetDstNamespace

func (x *APILog) GetDstNamespace() string

func (*APILog) GetDstPort

func (x *APILog) GetDstPort() string

func (*APILog) GetDstType

func (x *APILog) GetDstType() string

func (*APILog) GetId

func (x *APILog) GetId() uint64

func (*APILog) GetMethod

func (x *APILog) GetMethod() string

func (*APILog) GetPath

func (x *APILog) GetPath() string

func (*APILog) GetProtocol

func (x *APILog) GetProtocol() string

func (*APILog) GetResponseCode

func (x *APILog) GetResponseCode() int32

func (*APILog) GetSrcIP

func (x *APILog) GetSrcIP() string

func (*APILog) GetSrcLabel

func (x *APILog) GetSrcLabel() map[string]string

func (*APILog) GetSrcName

func (x *APILog) GetSrcName() string

func (*APILog) GetSrcNamespace

func (x *APILog) GetSrcNamespace() string

func (*APILog) GetSrcPort

func (x *APILog) GetSrcPort() string

func (*APILog) GetSrcType

func (x *APILog) GetSrcType() string

func (*APILog) GetTimeStamp

func (x *APILog) GetTimeStamp() string

func (*APILog) ProtoMessage

func (*APILog) ProtoMessage()

func (*APILog) ProtoReflect

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

func (*APILog) Reset

func (x *APILog) Reset()

func (*APILog) String

func (x *APILog) String() string

type APIMetrics

type APIMetrics struct {
	PerAPICounts map[string]uint64 `` // @todo: add some more metrics here
	/* 166-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*APIMetrics) Descriptor deprecated

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

Deprecated: Use APIMetrics.ProtoReflect.Descriptor instead.

func (*APIMetrics) GetPerAPICounts

func (x *APIMetrics) GetPerAPICounts() map[string]uint64

func (*APIMetrics) ProtoMessage

func (*APIMetrics) ProtoMessage()

func (*APIMetrics) ProtoReflect

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

func (*APIMetrics) Reset

func (x *APIMetrics) Reset()

func (*APIMetrics) String

func (x *APIMetrics) String() string

type ClientInfo

type ClientInfo struct {
	HostName  string `protobuf:"bytes,1,opt,name=hostName,proto3" json:"hostName,omitempty"`
	IPAddress string `protobuf:"bytes,2,opt,name=IPAddress,proto3" json:"IPAddress,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientInfo) Descriptor deprecated

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

Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.

func (*ClientInfo) GetHostName

func (x *ClientInfo) GetHostName() string

func (*ClientInfo) GetIPAddress

func (x *ClientInfo) GetIPAddress() string

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) ProtoReflect

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

func (*ClientInfo) Reset

func (x *ClientInfo) Reset()

func (*ClientInfo) String

func (x *ClientInfo) String() string

type EnvoyMetrics

type EnvoyMetrics struct {
	TimeStamp string                  `protobuf:"bytes,1,opt,name=timeStamp,proto3" json:"timeStamp,omitempty"`
	Namespace string                  `protobuf:"bytes,11,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Name      string                  `protobuf:"bytes,12,opt,name=name,proto3" json:"name,omitempty"`
	IPAddress string                  `protobuf:"bytes,13,opt,name=IPAddress,proto3" json:"IPAddress,omitempty"`
	Labels    map[string]string       `` /* 154-byte string literal not displayed */
	Metrics   map[string]*MetricValue `` /* 156-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*EnvoyMetrics) Descriptor deprecated

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

Deprecated: Use EnvoyMetrics.ProtoReflect.Descriptor instead.

func (*EnvoyMetrics) GetIPAddress

func (x *EnvoyMetrics) GetIPAddress() string

func (*EnvoyMetrics) GetLabels

func (x *EnvoyMetrics) GetLabels() map[string]string

func (*EnvoyMetrics) GetMetrics

func (x *EnvoyMetrics) GetMetrics() map[string]*MetricValue

func (*EnvoyMetrics) GetName

func (x *EnvoyMetrics) GetName() string

func (*EnvoyMetrics) GetNamespace

func (x *EnvoyMetrics) GetNamespace() string

func (*EnvoyMetrics) GetTimeStamp

func (x *EnvoyMetrics) GetTimeStamp() string

func (*EnvoyMetrics) ProtoMessage

func (*EnvoyMetrics) ProtoMessage()

func (*EnvoyMetrics) ProtoReflect

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

func (*EnvoyMetrics) Reset

func (x *EnvoyMetrics) Reset()

func (*EnvoyMetrics) String

func (x *EnvoyMetrics) String() string

type MetricValue

type MetricValue struct {
	Value map[string]string `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MetricValue) Descriptor deprecated

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

Deprecated: Use MetricValue.ProtoReflect.Descriptor instead.

func (*MetricValue) GetValue

func (x *MetricValue) GetValue() map[string]string

func (*MetricValue) ProtoMessage

func (*MetricValue) ProtoMessage()

func (*MetricValue) ProtoReflect

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

func (*MetricValue) Reset

func (x *MetricValue) Reset()

func (*MetricValue) String

func (x *MetricValue) String() string

type SentryFlowClient

type SentryFlowClient interface {
	GetAPILog(ctx context.Context, in *ClientInfo, opts ...grpc.CallOption) (SentryFlow_GetAPILogClient, error)
	GetAPIMetrics(ctx context.Context, in *ClientInfo, opts ...grpc.CallOption) (SentryFlow_GetAPIMetricsClient, error)
	GetEnvoyMetrics(ctx context.Context, in *ClientInfo, opts ...grpc.CallOption) (SentryFlow_GetEnvoyMetricsClient, error)
}

SentryFlowClient is the client API for SentryFlow 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.

func NewSentryFlowClient

func NewSentryFlowClient(cc grpc.ClientConnInterface) SentryFlowClient

type SentryFlowServer

type SentryFlowServer interface {
	GetAPILog(*ClientInfo, SentryFlow_GetAPILogServer) error
	GetAPIMetrics(*ClientInfo, SentryFlow_GetAPIMetricsServer) error
	GetEnvoyMetrics(*ClientInfo, SentryFlow_GetEnvoyMetricsServer) error
}

SentryFlowServer is the server API for SentryFlow service. All implementations should embed UnimplementedSentryFlowServer for forward compatibility

type SentryFlow_GetAPILogClient

type SentryFlow_GetAPILogClient interface {
	Recv() (*APILog, error)
	grpc.ClientStream
}

type SentryFlow_GetAPILogServer

type SentryFlow_GetAPILogServer interface {
	Send(*APILog) error
	grpc.ServerStream
}

type SentryFlow_GetAPIMetricsClient

type SentryFlow_GetAPIMetricsClient interface {
	Recv() (*APIMetrics, error)
	grpc.ClientStream
}

type SentryFlow_GetAPIMetricsServer

type SentryFlow_GetAPIMetricsServer interface {
	Send(*APIMetrics) error
	grpc.ServerStream
}

type SentryFlow_GetEnvoyMetricsClient

type SentryFlow_GetEnvoyMetricsClient interface {
	Recv() (*EnvoyMetrics, error)
	grpc.ClientStream
}

type SentryFlow_GetEnvoyMetricsServer

type SentryFlow_GetEnvoyMetricsServer interface {
	Send(*EnvoyMetrics) error
	grpc.ServerStream
}

type UnimplementedAPIClassifierServer

type UnimplementedAPIClassifierServer struct {
}

UnimplementedAPIClassifierServer should be embedded to have forward compatible implementations.

func (UnimplementedAPIClassifierServer) ClassifyAPIs

type UnimplementedSentryFlowServer

type UnimplementedSentryFlowServer struct {
}

UnimplementedSentryFlowServer should be embedded to have forward compatible implementations.

func (UnimplementedSentryFlowServer) GetAPILog

func (UnimplementedSentryFlowServer) GetAPIMetrics

func (UnimplementedSentryFlowServer) GetEnvoyMetrics

type UnsafeAPIClassifierServer

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

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

type UnsafeSentryFlowServer

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

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

Directories

Path Synopsis
golang module

Jump to

Keyboard shortcuts

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