appproc

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package appproc is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Appproc_Get_FullMethodName = "/service.collector.appproc.Appproc/Get"
)

Variables

View Source
var Appproc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "service.collector.appproc.Appproc",
	HandlerType: (*AppprocServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Appproc_Get_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "appproc/appproc.proto",
}

Appproc_ServiceDesc is the grpc.ServiceDesc for Appproc 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_appproc_appproc_proto protoreflect.FileDescriptor

Functions

func RegisterAppprocHandler

func RegisterAppprocHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAppprocHandler registers the http handlers for service Appproc to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAppprocHandlerClient

func RegisterAppprocHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AppprocClient) error

RegisterAppprocHandlerClient registers the http handlers for service Appproc to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AppprocClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AppprocClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AppprocClient" to call the correct interceptors.

func RegisterAppprocHandlerFromEndpoint

func RegisterAppprocHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAppprocHandlerFromEndpoint is same as RegisterAppprocHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAppprocHandlerServer

func RegisterAppprocHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AppprocServer) error

RegisterAppprocHandlerServer registers the http handlers for service Appproc to "mux". UnaryRPC :call AppprocServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAppprocHandlerFromEndpoint instead.

func RegisterAppprocServer

func RegisterAppprocServer(s grpc.ServiceRegistrar, srv AppprocServer)

Types

type AppprocClient

type AppprocClient interface {
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetReply, error)
}

AppprocClient is the client API for Appproc 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 NewAppprocClient

func NewAppprocClient(cc grpc.ClientConnInterface) AppprocClient

type AppprocMeta

type AppprocMeta struct {
	Application *application.ApplicationMete `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"`
	Processors  []*processor.ProcessorMeta   `protobuf:"bytes,2,rep,name=processors,proto3" json:"processors,omitempty"`
	// contains filtered or unexported fields
}

func (*AppprocMeta) Descriptor deprecated

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

Deprecated: Use AppprocMeta.ProtoReflect.Descriptor instead.

func (*AppprocMeta) GetApplication

func (x *AppprocMeta) GetApplication() *application.ApplicationMete

func (*AppprocMeta) GetProcessors

func (x *AppprocMeta) GetProcessors() []*processor.ProcessorMeta

func (*AppprocMeta) ProtoMessage

func (*AppprocMeta) ProtoMessage()

func (*AppprocMeta) ProtoReflect

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

func (*AppprocMeta) Reset

func (x *AppprocMeta) Reset()

func (*AppprocMeta) String

func (x *AppprocMeta) String() string

type AppprocServer

type AppprocServer interface {
	Get(context.Context, *GetRequest) (*GetReply, error)
	// contains filtered or unexported methods
}

AppprocServer is the server API for Appproc service. All implementations must embed UnimplementedAppprocServer for forward compatibility

type BoolValue

type BoolValue = wrapperspb.BoolValue

type BytesValue

type BytesValue = wrapperspb.BytesValue

type DoubleValue

type DoubleValue = wrapperspb.DoubleValue

type FloatValue

type FloatValue = wrapperspb.FloatValue

type GetReply

type GetReply struct {
	Code     int32          `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message  string         `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Appprocs []*AppprocMeta `protobuf:"bytes,3,rep,name=appprocs,proto3" json:"appprocs,omitempty"`
	Count    int32          `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	Total    int32          `protobuf:"varint,5,opt,name=total,proto3" json:"total,omitempty"`
	Page     int32          `protobuf:"varint,6,opt,name=page,proto3" json:"page,omitempty"`
	Limit    int32          `protobuf:"varint,7,opt,name=limit,proto3" json:"limit,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReply) Descriptor deprecated

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

Deprecated: Use GetReply.ProtoReflect.Descriptor instead.

func (*GetReply) GetAppprocs

func (x *GetReply) GetAppprocs() []*AppprocMeta

func (*GetReply) GetCode

func (x *GetReply) GetCode() int32

func (*GetReply) GetCount

func (x *GetReply) GetCount() int32

func (*GetReply) GetLimit

func (x *GetReply) GetLimit() int32

func (*GetReply) GetMessage

func (x *GetReply) GetMessage() string

func (*GetReply) GetPage

func (x *GetReply) GetPage() int32

func (*GetReply) GetTotal

func (x *GetReply) GetTotal() int32

func (*GetReply) ProtoMessage

func (*GetReply) ProtoMessage()

func (*GetReply) ProtoReflect

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

func (*GetReply) Reset

func (x *GetReply) Reset()

func (*GetReply) String

func (x *GetReply) String() string

type GetRequest

type GetRequest struct {
	Page    int32                  `protobuf:"varint,1,opt,name=page,proto3" json:"page,omitempty"`
	Limit   int32                  `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
	Appid   int32                  `protobuf:"varint,3,opt,name=appid,proto3" json:"appid,omitempty"`
	Appname string                 `protobuf:"bytes,4,opt,name=appname,proto3" json:"appname,omitempty"`
	Weight  *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=weight,proto3" json:"weight,omitempty"`
	State   string                 `protobuf:"bytes,6,opt,name=state,proto3" json:"state,omitempty"`
	// contains filtered or unexported fields
}

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetAppid

func (x *GetRequest) GetAppid() int32

func (*GetRequest) GetAppname

func (x *GetRequest) GetAppname() string

func (*GetRequest) GetLimit

func (x *GetRequest) GetLimit() int32

func (*GetRequest) GetPage

func (x *GetRequest) GetPage() int32

func (*GetRequest) GetState

func (x *GetRequest) GetState() string

func (*GetRequest) GetWeight

func (x *GetRequest) GetWeight() *wrapperspb.Int32Value

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type Int32Value

type Int32Value = wrapperspb.Int32Value

type Int64Value

type Int64Value = wrapperspb.Int64Value

type StringValue

type StringValue = wrapperspb.StringValue

type UInt32Value

type UInt32Value = wrapperspb.UInt32Value

type UInt64Value

type UInt64Value = wrapperspb.UInt64Value

type UnimplementedAppprocServer

type UnimplementedAppprocServer struct {
}

UnimplementedAppprocServer must be embedded to have forward compatible implementations.

func (UnimplementedAppprocServer) Get

type UnsafeAppprocServer

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

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

Jump to

Keyboard shortcuts

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