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) GetDeleted() []*GetFeatureResponse_DeletedItem
- 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 GetFeatureResponse_DeletedItem
- func (*GetFeatureResponse_DeletedItem) Descriptor() ([]byte, []int)deprecated
- func (x *GetFeatureResponse_DeletedItem) GetFeatureName() string
- func (x *GetFeatureResponse_DeletedItem) GetKeyName() string
- func (x *GetFeatureResponse_DeletedItem) GetKind() GetFeatureResponse_DeletedItem_Type
- func (x *GetFeatureResponse_DeletedItem) GetParamName() string
- func (*GetFeatureResponse_DeletedItem) ProtoMessage()
- func (x *GetFeatureResponse_DeletedItem) ProtoReflect() protoreflect.Message
- func (x *GetFeatureResponse_DeletedItem) Reset()
- func (x *GetFeatureResponse_DeletedItem) String() string
- type GetFeatureResponse_DeletedItem_Type
- func (GetFeatureResponse_DeletedItem_Type) Descriptor() protoreflect.EnumDescriptor
- func (x GetFeatureResponse_DeletedItem_Type) Enum() *GetFeatureResponse_DeletedItem_Type
- func (GetFeatureResponse_DeletedItem_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x GetFeatureResponse_DeletedItem_Type) Number() protoreflect.EnumNumber
- func (x GetFeatureResponse_DeletedItem_Type) String() string
- func (GetFeatureResponse_DeletedItem_Type) Type() protoreflect.EnumType
- 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 ( GetFeatureResponse_DeletedItem_Type_name = map[int32]string{ 0: "FEATURE", 1: "KEY", 2: "PARAM", } GetFeatureResponse_DeletedItem_Type_value = map[string]int32{ "FEATURE": 0, "KEY": 1, "PARAM": 2, } )
Enum value maps for GetFeatureResponse_DeletedItem_Type.
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"`
Deleted []*GetFeatureResponse_DeletedItem `protobuf:"bytes,3,rep,name=Deleted,proto3" json:"Deleted,omitempty"`
// contains filtered or unexported fields
}
func (*GetFeatureResponse) Descriptor
deprecated
func (*GetFeatureResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetFeatureResponse.ProtoReflect.Descriptor instead.
func (*GetFeatureResponse) GetDeleted ¶ added in v0.4.0
func (x *GetFeatureResponse) GetDeleted() []*GetFeatureResponse_DeletedItem
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 GetFeatureResponse_DeletedItem ¶ added in v0.4.0
type GetFeatureResponse_DeletedItem struct {
Kind GetFeatureResponse_DeletedItem_Type `protobuf:"varint,1,opt,name=Kind,proto3,enum=FeatureChaos.GetFeatureResponse_DeletedItem_Type" json:"Kind,omitempty"`
FeatureName string `protobuf:"bytes,2,opt,name=FeatureName,proto3" json:"FeatureName,omitempty"`
KeyName string `protobuf:"bytes,3,opt,name=KeyName,proto3" json:"KeyName,omitempty"` // for KEY and PARAM deletions
ParamName string `protobuf:"bytes,4,opt,name=ParamName,proto3" json:"ParamName,omitempty"` // for PARAM deletions
// contains filtered or unexported fields
}
Explicit deletions since last version
func (*GetFeatureResponse_DeletedItem) Descriptor
deprecated
added in
v0.4.0
func (*GetFeatureResponse_DeletedItem) Descriptor() ([]byte, []int)
Deprecated: Use GetFeatureResponse_DeletedItem.ProtoReflect.Descriptor instead.
func (*GetFeatureResponse_DeletedItem) GetFeatureName ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) GetFeatureName() string
func (*GetFeatureResponse_DeletedItem) GetKeyName ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) GetKeyName() string
func (*GetFeatureResponse_DeletedItem) GetKind ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) GetKind() GetFeatureResponse_DeletedItem_Type
func (*GetFeatureResponse_DeletedItem) GetParamName ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) GetParamName() string
func (*GetFeatureResponse_DeletedItem) ProtoMessage ¶ added in v0.4.0
func (*GetFeatureResponse_DeletedItem) ProtoMessage()
func (*GetFeatureResponse_DeletedItem) ProtoReflect ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) ProtoReflect() protoreflect.Message
func (*GetFeatureResponse_DeletedItem) Reset ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) Reset()
func (*GetFeatureResponse_DeletedItem) String ¶ added in v0.4.0
func (x *GetFeatureResponse_DeletedItem) String() string
type GetFeatureResponse_DeletedItem_Type ¶ added in v0.4.0
type GetFeatureResponse_DeletedItem_Type int32
const ( GetFeatureResponse_DeletedItem_FEATURE GetFeatureResponse_DeletedItem_Type = 0 GetFeatureResponse_DeletedItem_KEY GetFeatureResponse_DeletedItem_Type = 1 GetFeatureResponse_DeletedItem_PARAM GetFeatureResponse_DeletedItem_Type = 2 )
func (GetFeatureResponse_DeletedItem_Type) Descriptor ¶ added in v0.4.0
func (GetFeatureResponse_DeletedItem_Type) Descriptor() protoreflect.EnumDescriptor
func (GetFeatureResponse_DeletedItem_Type) Enum ¶ added in v0.4.0
func (x GetFeatureResponse_DeletedItem_Type) Enum() *GetFeatureResponse_DeletedItem_Type
func (GetFeatureResponse_DeletedItem_Type) EnumDescriptor
deprecated
added in
v0.4.0
func (GetFeatureResponse_DeletedItem_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use GetFeatureResponse_DeletedItem_Type.Descriptor instead.
func (GetFeatureResponse_DeletedItem_Type) Number ¶ added in v0.4.0
func (x GetFeatureResponse_DeletedItem_Type) Number() protoreflect.EnumNumber
func (GetFeatureResponse_DeletedItem_Type) String ¶ added in v0.4.0
func (x GetFeatureResponse_DeletedItem_Type) String() string
func (GetFeatureResponse_DeletedItem_Type) Type ¶ added in v0.4.0
func (GetFeatureResponse_DeletedItem_Type) Type() protoreflect.EnumType
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.