proto

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_limiter_proto protoreflect.FileDescriptor
View Source
var Limiter_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.Limiter",
	HandlerType: (*LimiterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Limit",
			Handler:    _Limiter_Limit_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "limiter.proto",
}

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

Functions

func RegisterLimiterServer

func RegisterLimiterServer(s grpc.ServiceRegistrar, srv LimiterServer)

Types

type LimitReply

type LimitReply struct {
	In  int64 `protobuf:"varint,1,opt,name=in,proto3" json:"in,omitempty"`
	Out int64 `protobuf:"varint,2,opt,name=out,proto3" json:"out,omitempty"`
	// contains filtered or unexported fields
}

func (*LimitReply) Descriptor deprecated

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

Deprecated: Use LimitReply.ProtoReflect.Descriptor instead.

func (*LimitReply) GetIn

func (x *LimitReply) GetIn() int64

func (*LimitReply) GetOut

func (x *LimitReply) GetOut() int64

func (*LimitReply) ProtoMessage

func (*LimitReply) ProtoMessage()

func (*LimitReply) ProtoReflect

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

func (*LimitReply) Reset

func (x *LimitReply) Reset()

func (*LimitReply) String

func (x *LimitReply) String() string

type LimitRequest

type LimitRequest struct {
	Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"`
	Addr    string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
	Client  string `protobuf:"bytes,3,opt,name=client,proto3" json:"client,omitempty"`
	Src     string `protobuf:"bytes,4,opt,name=src,proto3" json:"src,omitempty"`
	Service string `protobuf:"bytes,5,opt,name=service,proto3" json:"service,omitempty"`
	Scope   string `protobuf:"bytes,6,opt,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

func (*LimitRequest) Descriptor deprecated

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

Deprecated: Use LimitRequest.ProtoReflect.Descriptor instead.

func (*LimitRequest) GetAddr

func (x *LimitRequest) GetAddr() string

func (*LimitRequest) GetClient

func (x *LimitRequest) GetClient() string

func (*LimitRequest) GetNetwork

func (x *LimitRequest) GetNetwork() string

func (*LimitRequest) GetScope

func (x *LimitRequest) GetScope() string

func (*LimitRequest) GetService

func (x *LimitRequest) GetService() string

func (*LimitRequest) GetSrc

func (x *LimitRequest) GetSrc() string

func (*LimitRequest) ProtoMessage

func (*LimitRequest) ProtoMessage()

func (*LimitRequest) ProtoReflect

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

func (*LimitRequest) Reset

func (x *LimitRequest) Reset()

func (*LimitRequest) String

func (x *LimitRequest) String() string

type LimiterClient

type LimiterClient interface {
	Limit(ctx context.Context, in *LimitRequest, opts ...grpc.CallOption) (*LimitReply, error)
}

LimiterClient is the client API for Limiter 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 NewLimiterClient

func NewLimiterClient(cc grpc.ClientConnInterface) LimiterClient

type LimiterServer

type LimiterServer interface {
	Limit(context.Context, *LimitRequest) (*LimitReply, error)
	// contains filtered or unexported methods
}

LimiterServer is the server API for Limiter service. All implementations must embed UnimplementedLimiterServer for forward compatibility

type UnimplementedLimiterServer

type UnimplementedLimiterServer struct {
}

UnimplementedLimiterServer must be embedded to have forward compatible implementations.

func (UnimplementedLimiterServer) Limit

type UnsafeLimiterServer

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

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

Jump to

Keyboard shortcuts

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