Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFeatureServiceServer(s grpc.ServiceRegistrar, srv FeatureServiceServer)
- type Controller
- type FeatureItem
- func (*FeatureItem) Descriptor() ([]byte, []int)deprecated
- func (x *FeatureItem) GetAll() int32
- func (x *FeatureItem) GetName() string
- func (x *FeatureItem) GetProps() []*PropsItem
- func (*FeatureItem) ProtoMessage()
- func (x *FeatureItem) ProtoReflect() protoreflect.Message
- func (x *FeatureItem) Reset()
- func (x *FeatureItem) String() string
- type FeatureServiceClient
- type FeatureServiceServer
- type FeatureService_StatsClient
- type FeatureService_StatsServer
- type FeatureService_SubscribeClient
- type FeatureService_SubscribeServer
- type GetAllFeatureRequest
- func (*GetAllFeatureRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAllFeatureRequest) GetLastVersion() int64
- func (x *GetAllFeatureRequest) GetServiceName() string
- func (*GetAllFeatureRequest) ProtoMessage()
- func (x *GetAllFeatureRequest) ProtoReflect() protoreflect.Message
- func (x *GetAllFeatureRequest) Reset()
- func (x *GetAllFeatureRequest) String() string
- type GetFeatureResponse
- func (*GetFeatureResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetFeatureResponse) GetFeatures() []*FeatureItem
- func (x *GetFeatureResponse) GetVersion() int64
- func (*GetFeatureResponse) ProtoMessage()
- func (x *GetFeatureResponse) ProtoReflect() protoreflect.Message
- func (x *GetFeatureResponse) Reset()
- func (x *GetFeatureResponse) String() string
- type PropsItem
- func (*PropsItem) Descriptor() ([]byte, []int)deprecated
- func (x *PropsItem) GetAll() int32
- func (x *PropsItem) GetItem() map[string]int32
- func (x *PropsItem) GetName() string
- func (*PropsItem) ProtoMessage()
- func (x *PropsItem) ProtoReflect() protoreflect.Message
- func (x *PropsItem) Reset()
- func (x *PropsItem) String() string
- type SendStatsRequest
- func (*SendStatsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SendStatsRequest) GetFeatureName() string
- func (x *SendStatsRequest) GetServiceName() string
- func (*SendStatsRequest) ProtoMessage()
- func (x *SendStatsRequest) ProtoReflect() protoreflect.Message
- func (x *SendStatsRequest) Reset()
- func (x *SendStatsRequest) String() string
- type UnimplementedFeatureServiceServer
- type UnsafeFeatureServiceServer
Constants ¶
const ( FeatureService_Subscribe_FullMethodName = "/FeatureChaos.FeatureService/Subscribe" FeatureService_Stats_FullMethodName = "/FeatureChaos.FeatureService/Stats" )
Variables ¶
var FeatureService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "FeatureChaos.FeatureService", HandlerType: (*FeatureServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Subscribe", Handler: _FeatureService_Subscribe_Handler, ServerStreams: true, }, { StreamName: "Stats", Handler: _FeatureService_Stats_Handler, ClientStreams: true, }, }, Metadata: "FeatureChaos.proto", }
FeatureService_ServiceDesc is the grpc.ServiceDesc for FeatureService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_FeatureChaos_proto protoreflect.FileDescriptor
Functions ¶
func RegisterFeatureServiceServer ¶
func RegisterFeatureServiceServer(s grpc.ServiceRegistrar, srv FeatureServiceServer)
Types ¶
type Controller ¶
type Controller struct {
controller.Mock
UnimplementedFeatureServiceServer
// contains filtered or unexported fields
}
func NewController ¶
func NewController(name string) *Controller
func (*Controller) Init ¶
func (t *Controller) Init(app interfaces.IEngine, _ map[string]interface{}) error
func (*Controller) Stats ¶
func (t *Controller) Stats(request grpc2.ClientStreamingServer[SendStatsRequest, emptypb.Empty]) error
func (*Controller) Subscribe ¶
func (t *Controller) Subscribe(request *GetAllFeatureRequest, response grpc2.ServerStreamingServer[GetFeatureResponse]) error
type FeatureItem ¶
type FeatureItem struct {
All int32 `protobuf:"varint,1,opt,name=All,proto3" json:"All,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Props []*PropsItem `protobuf:"bytes,3,rep,name=Props,proto3" json:"Props,omitempty"`
// contains filtered or unexported fields
}
func (*FeatureItem) Descriptor
deprecated
func (*FeatureItem) Descriptor() ([]byte, []int)
Deprecated: Use FeatureItem.ProtoReflect.Descriptor instead.
func (*FeatureItem) GetAll ¶
func (x *FeatureItem) GetAll() int32
func (*FeatureItem) GetName ¶
func (x *FeatureItem) GetName() string
func (*FeatureItem) GetProps ¶
func (x *FeatureItem) GetProps() []*PropsItem
func (*FeatureItem) ProtoMessage ¶
func (*FeatureItem) ProtoMessage()
func (*FeatureItem) ProtoReflect ¶
func (x *FeatureItem) ProtoReflect() protoreflect.Message
func (*FeatureItem) Reset ¶
func (x *FeatureItem) Reset()
func (*FeatureItem) String ¶
func (x *FeatureItem) String() string
type FeatureServiceClient ¶
type FeatureServiceClient interface {
Subscribe(ctx context.Context, in *GetAllFeatureRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[GetFeatureResponse], error)
Stats(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[SendStatsRequest, emptypb.Empty], error)
}
FeatureServiceClient is the client API for FeatureService 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 NewFeatureServiceClient ¶
func NewFeatureServiceClient(cc grpc.ClientConnInterface) FeatureServiceClient
type FeatureServiceServer ¶
type FeatureServiceServer interface {
Subscribe(*GetAllFeatureRequest, grpc.ServerStreamingServer[GetFeatureResponse]) error
Stats(grpc.ClientStreamingServer[SendStatsRequest, emptypb.Empty]) error
// contains filtered or unexported methods
}
FeatureServiceServer is the server API for FeatureService service. All implementations must embed UnimplementedFeatureServiceServer for forward compatibility.
type FeatureService_StatsClient ¶
type FeatureService_StatsClient = grpc.ClientStreamingClient[SendStatsRequest, emptypb.Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FeatureService_StatsServer ¶
type FeatureService_StatsServer = grpc.ClientStreamingServer[SendStatsRequest, emptypb.Empty]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FeatureService_SubscribeClient ¶
type FeatureService_SubscribeClient = grpc.ServerStreamingClient[GetFeatureResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type FeatureService_SubscribeServer ¶
type FeatureService_SubscribeServer = grpc.ServerStreamingServer[GetFeatureResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type GetAllFeatureRequest ¶
type GetAllFeatureRequest struct {
ServiceName string `protobuf:"bytes,1,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
LastVersion int64 `protobuf:"varint,2,opt,name=LastVersion,proto3" json:"LastVersion,omitempty"`
// contains filtered or unexported fields
}
func (*GetAllFeatureRequest) Descriptor
deprecated
func (*GetAllFeatureRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAllFeatureRequest.ProtoReflect.Descriptor instead.
func (*GetAllFeatureRequest) GetLastVersion ¶
func (x *GetAllFeatureRequest) GetLastVersion() int64
func (*GetAllFeatureRequest) GetServiceName ¶
func (x *GetAllFeatureRequest) GetServiceName() string
func (*GetAllFeatureRequest) ProtoMessage ¶
func (*GetAllFeatureRequest) ProtoMessage()
func (*GetAllFeatureRequest) ProtoReflect ¶
func (x *GetAllFeatureRequest) ProtoReflect() protoreflect.Message
func (*GetAllFeatureRequest) Reset ¶
func (x *GetAllFeatureRequest) Reset()
func (*GetAllFeatureRequest) String ¶
func (x *GetAllFeatureRequest) String() string
type GetFeatureResponse ¶
type GetFeatureResponse struct {
Version int64 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"`
Features []*FeatureItem `protobuf:"bytes,2,rep,name=Features,proto3" json:"Features,omitempty"`
// contains filtered or unexported fields
}
func (*GetFeatureResponse) Descriptor
deprecated
func (*GetFeatureResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFeatureResponse.ProtoReflect.Descriptor instead.
func (*GetFeatureResponse) GetFeatures ¶
func (x *GetFeatureResponse) GetFeatures() []*FeatureItem
func (*GetFeatureResponse) GetVersion ¶
func (x *GetFeatureResponse) GetVersion() int64
func (*GetFeatureResponse) ProtoMessage ¶
func (*GetFeatureResponse) ProtoMessage()
func (*GetFeatureResponse) ProtoReflect ¶
func (x *GetFeatureResponse) ProtoReflect() protoreflect.Message
func (*GetFeatureResponse) Reset ¶
func (x *GetFeatureResponse) Reset()
func (*GetFeatureResponse) String ¶
func (x *GetFeatureResponse) String() string
type PropsItem ¶
type PropsItem struct {
All int32 `protobuf:"varint,1,opt,name=All,proto3" json:"All,omitempty"`
Name string `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
Item map[string]int32 `` /* 150-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*PropsItem) Descriptor
deprecated
func (*PropsItem) ProtoMessage ¶
func (*PropsItem) ProtoMessage()
func (*PropsItem) ProtoReflect ¶
func (x *PropsItem) ProtoReflect() protoreflect.Message
type SendStatsRequest ¶
type SendStatsRequest struct {
ServiceName string `protobuf:"bytes,1,opt,name=ServiceName,proto3" json:"ServiceName,omitempty"`
FeatureName string `protobuf:"bytes,2,opt,name=FeatureName,proto3" json:"FeatureName,omitempty"`
// contains filtered or unexported fields
}
func (*SendStatsRequest) Descriptor
deprecated
func (*SendStatsRequest) Descriptor() ([]byte, []int)
Deprecated: Use SendStatsRequest.ProtoReflect.Descriptor instead.
func (*SendStatsRequest) GetFeatureName ¶
func (x *SendStatsRequest) GetFeatureName() string
func (*SendStatsRequest) GetServiceName ¶
func (x *SendStatsRequest) GetServiceName() string
func (*SendStatsRequest) ProtoMessage ¶
func (*SendStatsRequest) ProtoMessage()
func (*SendStatsRequest) ProtoReflect ¶
func (x *SendStatsRequest) ProtoReflect() protoreflect.Message
func (*SendStatsRequest) Reset ¶
func (x *SendStatsRequest) Reset()
func (*SendStatsRequest) String ¶
func (x *SendStatsRequest) String() string
type UnimplementedFeatureServiceServer ¶
type UnimplementedFeatureServiceServer struct{}
UnimplementedFeatureServiceServer 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 (UnimplementedFeatureServiceServer) Subscribe ¶
func (UnimplementedFeatureServiceServer) Subscribe(*GetAllFeatureRequest, grpc.ServerStreamingServer[GetFeatureResponse]) error
type UnsafeFeatureServiceServer ¶
type UnsafeFeatureServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFeatureServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FeatureServiceServer will result in compilation errors.