testpb

package
v0.0.0-...-729d01d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GroupCacheTest_InitPeers_FullMethodName = "/testpb.GroupCacheTest/InitPeers"
	GroupCacheTest_Get_FullMethodName       = "/testpb.GroupCacheTest/Get"
	GroupCacheTest_GetStats_FullMethodName  = "/testpb.GroupCacheTest/GetStats"
)

Variables

View Source
var File_testpb_test_proto protoreflect.FileDescriptor
View Source
var GroupCacheTest_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "testpb.GroupCacheTest",
	HandlerType: (*GroupCacheTestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "InitPeers",
			Handler:    _GroupCacheTest_InitPeers_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _GroupCacheTest_Get_Handler,
		},
		{
			MethodName: "GetStats",
			Handler:    _GroupCacheTest_GetStats_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "testpb/test.proto",
}

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

Functions

func RegisterGroupCacheTestServer

func RegisterGroupCacheTestServer(s grpc.ServiceRegistrar, srv GroupCacheTestServer)

Types

type CacheStats

type CacheStats struct {
	Items  int64 `protobuf:"varint,1,opt,name=items,proto3" json:"items,omitempty"`
	Bytes  int64 `protobuf:"varint,2,opt,name=bytes,proto3" json:"bytes,omitempty"`
	Gets   int64 `protobuf:"varint,3,opt,name=gets,proto3" json:"gets,omitempty"`
	Hits   int64 `protobuf:"varint,4,opt,name=hits,proto3" json:"hits,omitempty"`
	Evicts int64 `protobuf:"varint,5,opt,name=evicts,proto3" json:"evicts,omitempty"`
	// contains filtered or unexported fields
}

func (*CacheStats) Descriptor deprecated

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

Deprecated: Use CacheStats.ProtoReflect.Descriptor instead.

func (*CacheStats) GetBytes

func (x *CacheStats) GetBytes() int64

func (*CacheStats) GetEvicts

func (x *CacheStats) GetEvicts() int64

func (*CacheStats) GetGets

func (x *CacheStats) GetGets() int64

func (*CacheStats) GetHits

func (x *CacheStats) GetHits() int64

func (*CacheStats) GetItems

func (x *CacheStats) GetItems() int64

func (*CacheStats) ProtoMessage

func (*CacheStats) ProtoMessage()

func (*CacheStats) ProtoReflect

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

func (*CacheStats) Reset

func (x *CacheStats) Reset()

func (*CacheStats) String

func (x *CacheStats) String() string

type Empty

type Empty struct {
	// contains filtered or unexported fields
}

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GroupCacheTestClient

type GroupCacheTestClient interface {
	InitPeers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
	Get(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
	GetStats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*StatsResponse, error)
}

GroupCacheTestClient is the client API for GroupCacheTest 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 GroupCacheTestServer

type GroupCacheTestServer interface {
	InitPeers(context.Context, *Empty) (*Empty, error)
	Get(context.Context, *TestRequest) (*TestResponse, error)
	GetStats(context.Context, *Empty) (*StatsResponse, error)
	// contains filtered or unexported methods
}

GroupCacheTestServer is the server API for GroupCacheTest service. All implementations must embed UnimplementedGroupCacheTestServer for forward compatibility

type StatsResponse

type StatsResponse struct {
	Gets       int64       `protobuf:"varint,1,opt,name=gets,proto3" json:"gets,omitempty"`
	CacheHits  int64       `protobuf:"varint,12,opt,name=cache_hits,json=cacheHits,proto3" json:"cache_hits,omitempty"`
	Fills      int64       `protobuf:"varint,2,opt,name=fills,proto3" json:"fills,omitempty"`
	TotalAlloc uint64      `protobuf:"varint,3,opt,name=total_alloc,json=totalAlloc,proto3" json:"total_alloc,omitempty"`
	MainCache  *CacheStats `protobuf:"bytes,4,opt,name=main_cache,json=mainCache,proto3" json:"main_cache,omitempty"`
	HotCache   *CacheStats `protobuf:"bytes,5,opt,name=hot_cache,json=hotCache,proto3" json:"hot_cache,omitempty"`
	ServerIn   int64       `protobuf:"varint,6,opt,name=server_in,json=serverIn,proto3" json:"server_in,omitempty"`
	Loads      int64       `protobuf:"varint,8,opt,name=loads,proto3" json:"loads,omitempty"`
	PeerLoads  int64       `protobuf:"varint,9,opt,name=peer_loads,json=peerLoads,proto3" json:"peer_loads,omitempty"`
	PeerErrors int64       `protobuf:"varint,10,opt,name=peer_errors,json=peerErrors,proto3" json:"peer_errors,omitempty"`
	LocalLoads int64       `protobuf:"varint,11,opt,name=local_loads,json=localLoads,proto3" json:"local_loads,omitempty"`
	// contains filtered or unexported fields
}

func (*StatsResponse) Descriptor deprecated

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

Deprecated: Use StatsResponse.ProtoReflect.Descriptor instead.

func (*StatsResponse) GetCacheHits

func (x *StatsResponse) GetCacheHits() int64

func (*StatsResponse) GetFills

func (x *StatsResponse) GetFills() int64

func (*StatsResponse) GetGets

func (x *StatsResponse) GetGets() int64

func (*StatsResponse) GetHotCache

func (x *StatsResponse) GetHotCache() *CacheStats

func (*StatsResponse) GetLoads

func (x *StatsResponse) GetLoads() int64

func (*StatsResponse) GetLocalLoads

func (x *StatsResponse) GetLocalLoads() int64

func (*StatsResponse) GetMainCache

func (x *StatsResponse) GetMainCache() *CacheStats

func (*StatsResponse) GetPeerErrors

func (x *StatsResponse) GetPeerErrors() int64

func (*StatsResponse) GetPeerLoads

func (x *StatsResponse) GetPeerLoads() int64

func (*StatsResponse) GetServerIn

func (x *StatsResponse) GetServerIn() int64

func (*StatsResponse) GetTotalAlloc

func (x *StatsResponse) GetTotalAlloc() uint64

func (*StatsResponse) ProtoMessage

func (*StatsResponse) ProtoMessage()

func (*StatsResponse) ProtoReflect

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

func (*StatsResponse) Reset

func (x *StatsResponse) Reset()

func (*StatsResponse) String

func (x *StatsResponse) String() string

type TestMessage

type TestMessage struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	City string `protobuf:"bytes,2,opt,name=city,proto3" json:"city,omitempty"`
	// contains filtered or unexported fields
}

func (*TestMessage) Descriptor deprecated

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

Deprecated: Use TestMessage.ProtoReflect.Descriptor instead.

func (*TestMessage) GetCity

func (x *TestMessage) GetCity() string

func (*TestMessage) GetName

func (x *TestMessage) GetName() string

func (*TestMessage) ProtoMessage

func (*TestMessage) ProtoMessage()

func (*TestMessage) ProtoReflect

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

func (*TestMessage) Reset

func (x *TestMessage) Reset()

func (*TestMessage) String

func (x *TestMessage) String() string

type TestRequest

type TestRequest struct {
	Lower       string `protobuf:"bytes,1,opt,name=lower,proto3" json:"lower,omitempty"`                                 // to be returned upper case
	RepeatCount int32  `protobuf:"varint,2,opt,name=repeat_count,json=repeatCount,proto3" json:"repeat_count,omitempty"` // .. this many times
	// contains filtered or unexported fields
}

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetLower

func (x *TestRequest) GetLower() string

func (*TestRequest) GetRepeatCount

func (x *TestRequest) GetRepeatCount() int32

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type TestResponse

type TestResponse struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResponse) Descriptor deprecated

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

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetValue

func (x *TestResponse) GetValue() string

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect

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

func (*TestResponse) Reset

func (x *TestResponse) Reset()

func (*TestResponse) String

func (x *TestResponse) String() string

type UnimplementedGroupCacheTestServer

type UnimplementedGroupCacheTestServer struct {
}

UnimplementedGroupCacheTestServer must be embedded to have forward compatible implementations.

func (UnimplementedGroupCacheTestServer) Get

func (UnimplementedGroupCacheTestServer) GetStats

func (UnimplementedGroupCacheTestServer) InitPeers

type UnsafeGroupCacheTestServer

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

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

Jump to

Keyboard shortcuts

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