Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCompressionServiceServer(s grpc.ServiceRegistrar, srv CompressionServiceServer)
- type CompressRequest
- func (*CompressRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CompressRequest) GetBudget() int32
- func (x *CompressRequest) GetInput() string
- func (x *CompressRequest) GetMode() string
- func (x *CompressRequest) GetPreset() string
- func (x *CompressRequest) GetQueryIntent() string
- func (*CompressRequest) ProtoMessage()
- func (x *CompressRequest) ProtoReflect() protoreflect.Message
- func (x *CompressRequest) Reset()
- func (x *CompressRequest) String() string
- type CompressResponse
- func (*CompressResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CompressResponse) GetCompressedTokens() int32
- func (x *CompressResponse) GetLayersApplied() []string
- func (x *CompressResponse) GetOriginalTokens() int32
- func (x *CompressResponse) GetOutput() string
- func (x *CompressResponse) GetSavingsPercent() float64
- func (*CompressResponse) ProtoMessage()
- func (x *CompressResponse) ProtoReflect() protoreflect.Message
- func (x *CompressResponse) Reset()
- func (x *CompressResponse) String() string
- type CompressionServiceClient
- type CompressionServiceServer
- type GetLayersRequest
- type GetLayersResponse
- func (*GetLayersResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetLayersResponse) GetLayers() []*LayerInfo
- func (*GetLayersResponse) ProtoMessage()
- func (x *GetLayersResponse) ProtoReflect() protoreflect.Message
- func (x *GetLayersResponse) Reset()
- func (x *GetLayersResponse) String() string
- type GetStatsRequest
- type GetStatsResponse
- func (*GetStatsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetStatsResponse) GetAverageCompression() float64
- func (x *GetStatsResponse) GetP99LatencyMs() float64
- func (x *GetStatsResponse) GetTotalCompressions() int64
- func (x *GetStatsResponse) GetTotalTokensSaved() int64
- func (*GetStatsResponse) ProtoMessage()
- func (x *GetStatsResponse) ProtoReflect() protoreflect.Message
- func (x *GetStatsResponse) Reset()
- func (x *GetStatsResponse) String() string
- type LayerInfo
- func (*LayerInfo) Descriptor() ([]byte, []int)deprecated
- func (x *LayerInfo) GetCompression() string
- func (x *LayerInfo) GetName() string
- func (x *LayerInfo) GetNumber() int32
- func (x *LayerInfo) GetResearch() string
- func (*LayerInfo) ProtoMessage()
- func (x *LayerInfo) ProtoReflect() protoreflect.Message
- func (x *LayerInfo) Reset()
- func (x *LayerInfo) String() string
- type UnimplementedCompressionServiceServer
- func (UnimplementedCompressionServiceServer) Compress(context.Context, *CompressRequest) (*CompressResponse, error)
- func (UnimplementedCompressionServiceServer) GetLayers(context.Context, *GetLayersRequest) (*GetLayersResponse, error)
- func (UnimplementedCompressionServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
- type UnsafeCompressionServiceServer
Constants ¶
const ( CompressionService_Compress_FullMethodName = "/tokman.compression.v1.CompressionService/Compress" CompressionService_GetStats_FullMethodName = "/tokman.compression.v1.CompressionService/GetStats" CompressionService_GetLayers_FullMethodName = "/tokman.compression.v1.CompressionService/GetLayers" )
Variables ¶
var CompressionService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "tokman.compression.v1.CompressionService", HandlerType: (*CompressionServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Compress", Handler: _CompressionService_Compress_Handler, }, { MethodName: "GetStats", Handler: _CompressionService_GetStats_Handler, }, { MethodName: "GetLayers", Handler: _CompressionService_GetLayers_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/compression.proto", }
CompressionService_ServiceDesc is the grpc.ServiceDesc for CompressionService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_proto_compression_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCompressionServiceServer ¶
func RegisterCompressionServiceServer(s grpc.ServiceRegistrar, srv CompressionServiceServer)
Types ¶
type CompressRequest ¶
type CompressRequest struct {
Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
Mode string `protobuf:"bytes,2,opt,name=mode,proto3" json:"mode,omitempty"` // none, minimal, aggressive
QueryIntent string `protobuf:"bytes,3,opt,name=query_intent,json=queryIntent,proto3" json:"query_intent,omitempty"`
Budget int32 `protobuf:"varint,4,opt,name=budget,proto3" json:"budget,omitempty"`
Preset string `protobuf:"bytes,5,opt,name=preset,proto3" json:"preset,omitempty"` // fast, balanced, full
// contains filtered or unexported fields
}
func (*CompressRequest) Descriptor
deprecated
func (*CompressRequest) Descriptor() ([]byte, []int)
Deprecated: Use CompressRequest.ProtoReflect.Descriptor instead.
func (*CompressRequest) GetBudget ¶
func (x *CompressRequest) GetBudget() int32
func (*CompressRequest) GetInput ¶
func (x *CompressRequest) GetInput() string
func (*CompressRequest) GetMode ¶
func (x *CompressRequest) GetMode() string
func (*CompressRequest) GetPreset ¶
func (x *CompressRequest) GetPreset() string
func (*CompressRequest) GetQueryIntent ¶
func (x *CompressRequest) GetQueryIntent() string
func (*CompressRequest) ProtoMessage ¶
func (*CompressRequest) ProtoMessage()
func (*CompressRequest) ProtoReflect ¶
func (x *CompressRequest) ProtoReflect() protoreflect.Message
func (*CompressRequest) Reset ¶
func (x *CompressRequest) Reset()
func (*CompressRequest) String ¶
func (x *CompressRequest) String() string
type CompressResponse ¶
type CompressResponse struct {
Output string `protobuf:"bytes,1,opt,name=output,proto3" json:"output,omitempty"`
OriginalTokens int32 `protobuf:"varint,2,opt,name=original_tokens,json=originalTokens,proto3" json:"original_tokens,omitempty"`
CompressedTokens int32 `protobuf:"varint,3,opt,name=compressed_tokens,json=compressedTokens,proto3" json:"compressed_tokens,omitempty"`
SavingsPercent float64 `protobuf:"fixed64,4,opt,name=savings_percent,json=savingsPercent,proto3" json:"savings_percent,omitempty"`
LayersApplied []string `protobuf:"bytes,5,rep,name=layers_applied,json=layersApplied,proto3" json:"layers_applied,omitempty"`
// contains filtered or unexported fields
}
func (*CompressResponse) Descriptor
deprecated
func (*CompressResponse) Descriptor() ([]byte, []int)
Deprecated: Use CompressResponse.ProtoReflect.Descriptor instead.
func (*CompressResponse) GetCompressedTokens ¶
func (x *CompressResponse) GetCompressedTokens() int32
func (*CompressResponse) GetLayersApplied ¶
func (x *CompressResponse) GetLayersApplied() []string
func (*CompressResponse) GetOriginalTokens ¶
func (x *CompressResponse) GetOriginalTokens() int32
func (*CompressResponse) GetOutput ¶
func (x *CompressResponse) GetOutput() string
func (*CompressResponse) GetSavingsPercent ¶
func (x *CompressResponse) GetSavingsPercent() float64
func (*CompressResponse) ProtoMessage ¶
func (*CompressResponse) ProtoMessage()
func (*CompressResponse) ProtoReflect ¶
func (x *CompressResponse) ProtoReflect() protoreflect.Message
func (*CompressResponse) Reset ¶
func (x *CompressResponse) Reset()
func (*CompressResponse) String ¶
func (x *CompressResponse) String() string
type CompressionServiceClient ¶
type CompressionServiceClient interface {
// Compress applies the compression pipeline to input text.
Compress(ctx context.Context, in *CompressRequest, opts ...grpc.CallOption) (*CompressResponse, error)
// GetStats returns compression statistics.
GetStats(ctx context.Context, in *GetStatsRequest, opts ...grpc.CallOption) (*GetStatsResponse, error)
// GetLayers returns information about all compression layers.
GetLayers(ctx context.Context, in *GetLayersRequest, opts ...grpc.CallOption) (*GetLayersResponse, error)
}
CompressionServiceClient is the client API for CompressionService 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.
Compression service provides the 31-layer compression pipeline.
func NewCompressionServiceClient ¶
func NewCompressionServiceClient(cc grpc.ClientConnInterface) CompressionServiceClient
type CompressionServiceServer ¶
type CompressionServiceServer interface {
// Compress applies the compression pipeline to input text.
Compress(context.Context, *CompressRequest) (*CompressResponse, error)
// GetStats returns compression statistics.
GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
// GetLayers returns information about all compression layers.
GetLayers(context.Context, *GetLayersRequest) (*GetLayersResponse, error)
// contains filtered or unexported methods
}
CompressionServiceServer is the server API for CompressionService service. All implementations must embed UnimplementedCompressionServiceServer for forward compatibility.
Compression service provides the 31-layer compression pipeline.
type GetLayersRequest ¶
type GetLayersRequest struct {
// contains filtered or unexported fields
}
func (*GetLayersRequest) Descriptor
deprecated
func (*GetLayersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetLayersRequest.ProtoReflect.Descriptor instead.
func (*GetLayersRequest) ProtoMessage ¶
func (*GetLayersRequest) ProtoMessage()
func (*GetLayersRequest) ProtoReflect ¶
func (x *GetLayersRequest) ProtoReflect() protoreflect.Message
func (*GetLayersRequest) Reset ¶
func (x *GetLayersRequest) Reset()
func (*GetLayersRequest) String ¶
func (x *GetLayersRequest) String() string
type GetLayersResponse ¶
type GetLayersResponse struct {
Layers []*LayerInfo `protobuf:"bytes,1,rep,name=layers,proto3" json:"layers,omitempty"`
// contains filtered or unexported fields
}
func (*GetLayersResponse) Descriptor
deprecated
func (*GetLayersResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetLayersResponse.ProtoReflect.Descriptor instead.
func (*GetLayersResponse) GetLayers ¶
func (x *GetLayersResponse) GetLayers() []*LayerInfo
func (*GetLayersResponse) ProtoMessage ¶
func (*GetLayersResponse) ProtoMessage()
func (*GetLayersResponse) ProtoReflect ¶
func (x *GetLayersResponse) ProtoReflect() protoreflect.Message
func (*GetLayersResponse) Reset ¶
func (x *GetLayersResponse) Reset()
func (*GetLayersResponse) String ¶
func (x *GetLayersResponse) String() string
type GetStatsRequest ¶
type GetStatsRequest struct {
// contains filtered or unexported fields
}
func (*GetStatsRequest) Descriptor
deprecated
func (*GetStatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetStatsRequest.ProtoReflect.Descriptor instead.
func (*GetStatsRequest) ProtoMessage ¶
func (*GetStatsRequest) ProtoMessage()
func (*GetStatsRequest) ProtoReflect ¶
func (x *GetStatsRequest) ProtoReflect() protoreflect.Message
func (*GetStatsRequest) Reset ¶
func (x *GetStatsRequest) Reset()
func (*GetStatsRequest) String ¶
func (x *GetStatsRequest) String() string
type GetStatsResponse ¶
type GetStatsResponse struct {
TotalCompressions int64 `protobuf:"varint,1,opt,name=total_compressions,json=totalCompressions,proto3" json:"total_compressions,omitempty"`
TotalTokensSaved int64 `protobuf:"varint,2,opt,name=total_tokens_saved,json=totalTokensSaved,proto3" json:"total_tokens_saved,omitempty"`
AverageCompression float64 `protobuf:"fixed64,3,opt,name=average_compression,json=averageCompression,proto3" json:"average_compression,omitempty"`
P99LatencyMs float64 `protobuf:"fixed64,4,opt,name=p99_latency_ms,json=p99LatencyMs,proto3" json:"p99_latency_ms,omitempty"`
// contains filtered or unexported fields
}
func (*GetStatsResponse) Descriptor
deprecated
func (*GetStatsResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetStatsResponse.ProtoReflect.Descriptor instead.
func (*GetStatsResponse) GetAverageCompression ¶
func (x *GetStatsResponse) GetAverageCompression() float64
func (*GetStatsResponse) GetP99LatencyMs ¶
func (x *GetStatsResponse) GetP99LatencyMs() float64
func (*GetStatsResponse) GetTotalCompressions ¶
func (x *GetStatsResponse) GetTotalCompressions() int64
func (*GetStatsResponse) GetTotalTokensSaved ¶
func (x *GetStatsResponse) GetTotalTokensSaved() int64
func (*GetStatsResponse) ProtoMessage ¶
func (*GetStatsResponse) ProtoMessage()
func (*GetStatsResponse) ProtoReflect ¶
func (x *GetStatsResponse) ProtoReflect() protoreflect.Message
func (*GetStatsResponse) Reset ¶
func (x *GetStatsResponse) Reset()
func (*GetStatsResponse) String ¶
func (x *GetStatsResponse) String() string
type LayerInfo ¶
type LayerInfo struct {
Number int32 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
Research string `protobuf:"bytes,3,opt,name=research,proto3" json:"research,omitempty"`
Compression string `protobuf:"bytes,4,opt,name=compression,proto3" json:"compression,omitempty"`
// contains filtered or unexported fields
}
func (*LayerInfo) Descriptor
deprecated
func (*LayerInfo) GetCompression ¶
func (*LayerInfo) GetResearch ¶
func (*LayerInfo) ProtoMessage ¶
func (*LayerInfo) ProtoMessage()
func (*LayerInfo) ProtoReflect ¶
func (x *LayerInfo) ProtoReflect() protoreflect.Message
type UnimplementedCompressionServiceServer ¶
type UnimplementedCompressionServiceServer struct{}
UnimplementedCompressionServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCompressionServiceServer) Compress ¶
func (UnimplementedCompressionServiceServer) Compress(context.Context, *CompressRequest) (*CompressResponse, error)
func (UnimplementedCompressionServiceServer) GetLayers ¶
func (UnimplementedCompressionServiceServer) GetLayers(context.Context, *GetLayersRequest) (*GetLayersResponse, error)
func (UnimplementedCompressionServiceServer) GetStats ¶
func (UnimplementedCompressionServiceServer) GetStats(context.Context, *GetStatsRequest) (*GetStatsResponse, error)
type UnsafeCompressionServiceServer ¶
type UnsafeCompressionServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCompressionServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CompressionServiceServer will result in compilation errors.