Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterFlagServiceServer(s grpc.ServiceRegistrar, srv FlagServiceServer)
- type EvalAllResponse
- func (*EvalAllResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EvalAllResponse) GetValues() map[string]*EvalResponse
- func (*EvalAllResponse) ProtoMessage()
- func (x *EvalAllResponse) ProtoReflect() protoreflect.Message
- func (x *EvalAllResponse) Reset()
- func (x *EvalAllResponse) String() string
- type EvalRequest
- func (*EvalRequest) Descriptor() ([]byte, []int)deprecated
- func (x *EvalRequest) GetKey() string
- func (x *EvalRequest) GetSdkId() string
- func (x *EvalRequest) GetUser() map[string]*UserValue
- func (*EvalRequest) ProtoMessage()
- func (x *EvalRequest) ProtoReflect() protoreflect.Message
- func (x *EvalRequest) Reset()
- func (x *EvalRequest) String() string
- type EvalResponse
- func (*EvalResponse) Descriptor() ([]byte, []int)deprecated
- func (x *EvalResponse) GetBoolValue() bool
- func (x *EvalResponse) GetDoubleValue() float64
- func (x *EvalResponse) GetIntValue() int32
- func (x *EvalResponse) GetStringValue() string
- func (m *EvalResponse) GetValue() isEvalResponse_Value
- func (x *EvalResponse) GetVariationId() string
- func (*EvalResponse) ProtoMessage()
- func (x *EvalResponse) ProtoReflect() protoreflect.Message
- func (x *EvalResponse) Reset()
- func (x *EvalResponse) String() string
- type EvalResponse_BoolValue
- type EvalResponse_DoubleValue
- type EvalResponse_IntValue
- type EvalResponse_StringValue
- type FlagServiceClient
- type FlagServiceServer
- type FlagService_EvalAllFlagsStreamClient
- type FlagService_EvalAllFlagsStreamServer
- type FlagService_EvalFlagStreamClient
- type FlagService_EvalFlagStreamServer
- type KeysRequest
- type KeysResponse
- type RefreshRequest
- type StringList
- type UnimplementedFlagServiceServer
- func (UnimplementedFlagServiceServer) EvalAllFlags(context.Context, *EvalRequest) (*EvalAllResponse, error)
- func (UnimplementedFlagServiceServer) EvalAllFlagsStream(*EvalRequest, FlagService_EvalAllFlagsStreamServer) error
- func (UnimplementedFlagServiceServer) EvalFlag(context.Context, *EvalRequest) (*EvalResponse, error)
- func (UnimplementedFlagServiceServer) EvalFlagStream(*EvalRequest, FlagService_EvalFlagStreamServer) error
- func (UnimplementedFlagServiceServer) GetKeys(context.Context, *KeysRequest) (*KeysResponse, error)
- func (UnimplementedFlagServiceServer) Refresh(context.Context, *RefreshRequest) (*emptypb.Empty, error)
- type UnsafeFlagServiceServer
- type UserValue
- func (*UserValue) Descriptor() ([]byte, []int)deprecated
- func (x *UserValue) GetNumberValue() float64
- func (x *UserValue) GetStringListValue() *StringList
- func (x *UserValue) GetStringValue() string
- func (x *UserValue) GetTimeValue() *timestamppb.Timestamp
- func (m *UserValue) GetValue() isUserValue_Value
- func (*UserValue) ProtoMessage()
- func (x *UserValue) ProtoReflect() protoreflect.Message
- func (x *UserValue) Reset()
- func (x *UserValue) String() string
- type UserValue_NumberValue
- type UserValue_StringListValue
- type UserValue_StringValue
- type UserValue_TimeValue
Constants ¶
const ( FlagService_EvalFlagStream_FullMethodName = "/configcat.FlagService/EvalFlagStream" FlagService_EvalAllFlagsStream_FullMethodName = "/configcat.FlagService/EvalAllFlagsStream" FlagService_EvalFlag_FullMethodName = "/configcat.FlagService/EvalFlag" FlagService_EvalAllFlags_FullMethodName = "/configcat.FlagService/EvalAllFlags" FlagService_GetKeys_FullMethodName = "/configcat.FlagService/GetKeys" FlagService_Refresh_FullMethodName = "/configcat.FlagService/Refresh" )
Variables ¶
var File_flag_service_proto protoreflect.FileDescriptor
var FlagService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "configcat.FlagService", HandlerType: (*FlagServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "EvalFlag", Handler: _FlagService_EvalFlag_Handler, }, { MethodName: "EvalAllFlags", Handler: _FlagService_EvalAllFlags_Handler, }, { MethodName: "GetKeys", Handler: _FlagService_GetKeys_Handler, }, { MethodName: "Refresh", Handler: _FlagService_Refresh_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "EvalFlagStream", Handler: _FlagService_EvalFlagStream_Handler, ServerStreams: true, }, { StreamName: "EvalAllFlagsStream", Handler: _FlagService_EvalAllFlagsStream_Handler, ServerStreams: true, }, }, Metadata: "flag_service.proto", }
FlagService_ServiceDesc is the grpc.ServiceDesc for FlagService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFlagServiceServer ¶
func RegisterFlagServiceServer(s grpc.ServiceRegistrar, srv FlagServiceServer)
Types ¶
type EvalAllResponse ¶
type EvalAllResponse struct { // The evaluated value of each feature flag. Values map[string]*EvalResponse `` /* 153-byte string literal not displayed */ // contains filtered or unexported fields }
Response message that contains the evaluation result of each feature flag.
func (*EvalAllResponse) Descriptor
deprecated
func (*EvalAllResponse) Descriptor() ([]byte, []int)
Deprecated: Use EvalAllResponse.ProtoReflect.Descriptor instead.
func (*EvalAllResponse) GetValues ¶
func (x *EvalAllResponse) GetValues() map[string]*EvalResponse
func (*EvalAllResponse) ProtoMessage ¶
func (*EvalAllResponse) ProtoMessage()
func (*EvalAllResponse) ProtoReflect ¶
func (x *EvalAllResponse) ProtoReflect() protoreflect.Message
func (*EvalAllResponse) Reset ¶
func (x *EvalAllResponse) Reset()
func (*EvalAllResponse) String ¶
func (x *EvalAllResponse) String() string
type EvalRequest ¶
type EvalRequest struct { // The SDK identifier. SdkId string `protobuf:"bytes,1,opt,name=sdk_id,json=sdkId,proto3" json:"sdk_id,omitempty"` // The feature flag's key to evaluate. Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // The user object. User map[string]*UserValue `` /* 149-byte string literal not displayed */ // contains filtered or unexported fields }
Feature flag evaluation request message.
func (*EvalRequest) Descriptor
deprecated
func (*EvalRequest) Descriptor() ([]byte, []int)
Deprecated: Use EvalRequest.ProtoReflect.Descriptor instead.
func (*EvalRequest) GetKey ¶
func (x *EvalRequest) GetKey() string
func (*EvalRequest) GetSdkId ¶
func (x *EvalRequest) GetSdkId() string
func (*EvalRequest) GetUser ¶
func (x *EvalRequest) GetUser() map[string]*UserValue
func (*EvalRequest) ProtoMessage ¶
func (*EvalRequest) ProtoMessage()
func (*EvalRequest) ProtoReflect ¶
func (x *EvalRequest) ProtoReflect() protoreflect.Message
func (*EvalRequest) Reset ¶
func (x *EvalRequest) Reset()
func (*EvalRequest) String ¶
func (x *EvalRequest) String() string
type EvalResponse ¶
type EvalResponse struct { // The evaluated value. // // Types that are assignable to Value: // // *EvalResponse_IntValue // *EvalResponse_DoubleValue // *EvalResponse_StringValue // *EvalResponse_BoolValue Value isEvalResponse_Value `protobuf_oneof:"value"` // The variation ID. VariationId string `protobuf:"bytes,5,opt,name=variation_id,json=variationId,proto3" json:"variation_id,omitempty"` // contains filtered or unexported fields }
Feature flag evaluation response message.
func (*EvalResponse) Descriptor
deprecated
func (*EvalResponse) Descriptor() ([]byte, []int)
Deprecated: Use EvalResponse.ProtoReflect.Descriptor instead.
func (*EvalResponse) GetBoolValue ¶
func (x *EvalResponse) GetBoolValue() bool
func (*EvalResponse) GetDoubleValue ¶
func (x *EvalResponse) GetDoubleValue() float64
func (*EvalResponse) GetIntValue ¶
func (x *EvalResponse) GetIntValue() int32
func (*EvalResponse) GetStringValue ¶
func (x *EvalResponse) GetStringValue() string
func (*EvalResponse) GetValue ¶
func (m *EvalResponse) GetValue() isEvalResponse_Value
func (*EvalResponse) GetVariationId ¶
func (x *EvalResponse) GetVariationId() string
func (*EvalResponse) ProtoMessage ¶
func (*EvalResponse) ProtoMessage()
func (*EvalResponse) ProtoReflect ¶
func (x *EvalResponse) ProtoReflect() protoreflect.Message
func (*EvalResponse) Reset ¶
func (x *EvalResponse) Reset()
func (*EvalResponse) String ¶
func (x *EvalResponse) String() string
type EvalResponse_BoolValue ¶
type EvalResponse_BoolValue struct {
BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,proto3,oneof"`
}
type EvalResponse_DoubleValue ¶
type EvalResponse_DoubleValue struct {
DoubleValue float64 `protobuf:"fixed64,2,opt,name=double_value,json=doubleValue,proto3,oneof"`
}
type EvalResponse_IntValue ¶
type EvalResponse_IntValue struct {
IntValue int32 `protobuf:"varint,1,opt,name=int_value,json=intValue,proto3,oneof"`
}
type EvalResponse_StringValue ¶
type EvalResponse_StringValue struct {
StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type FlagServiceClient ¶
type FlagServiceClient interface { // Stream for getting notified when a feature flag's value changes. EvalFlagStream(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (FlagService_EvalFlagStreamClient, error) // Stream for getting notified when any feature flag's value changes. EvalAllFlagsStream(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (FlagService_EvalAllFlagsStreamClient, error) // Evaluates a feature flag. EvalFlag(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalResponse, error) // Evaluates each feature flag. EvalAllFlags(ctx context.Context, in *EvalRequest, opts ...grpc.CallOption) (*EvalAllResponse, error) // Requests the keys of each feature flag. GetKeys(ctx context.Context, in *KeysRequest, opts ...grpc.CallOption) (*KeysResponse, error) // Commands the underlying SDK to refresh its evaluation data. Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) }
FlagServiceClient is the client API for FlagService 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 NewFlagServiceClient ¶
func NewFlagServiceClient(cc grpc.ClientConnInterface) FlagServiceClient
type FlagServiceServer ¶
type FlagServiceServer interface { // Stream for getting notified when a feature flag's value changes. EvalFlagStream(*EvalRequest, FlagService_EvalFlagStreamServer) error // Stream for getting notified when any feature flag's value changes. EvalAllFlagsStream(*EvalRequest, FlagService_EvalAllFlagsStreamServer) error // Evaluates a feature flag. EvalFlag(context.Context, *EvalRequest) (*EvalResponse, error) // Evaluates each feature flag. EvalAllFlags(context.Context, *EvalRequest) (*EvalAllResponse, error) // Requests the keys of each feature flag. GetKeys(context.Context, *KeysRequest) (*KeysResponse, error) // Commands the underlying SDK to refresh its evaluation data. Refresh(context.Context, *RefreshRequest) (*emptypb.Empty, error) // contains filtered or unexported methods }
FlagServiceServer is the server API for FlagService service. All implementations must embed UnimplementedFlagServiceServer for forward compatibility
type FlagService_EvalAllFlagsStreamClient ¶
type FlagService_EvalAllFlagsStreamClient interface { Recv() (*EvalAllResponse, error) grpc.ClientStream }
type FlagService_EvalAllFlagsStreamServer ¶
type FlagService_EvalAllFlagsStreamServer interface { Send(*EvalAllResponse) error grpc.ServerStream }
type FlagService_EvalFlagStreamClient ¶
type FlagService_EvalFlagStreamClient interface { Recv() (*EvalResponse, error) grpc.ClientStream }
type FlagService_EvalFlagStreamServer ¶
type FlagService_EvalFlagStreamServer interface { Send(*EvalResponse) error grpc.ServerStream }
type KeysRequest ¶
type KeysRequest struct { // The SDK identifier. SdkId string `protobuf:"bytes,1,opt,name=sdk_id,json=sdkId,proto3" json:"sdk_id,omitempty"` // contains filtered or unexported fields }
Request message for getting each available feature flag's key.
func (*KeysRequest) Descriptor
deprecated
func (*KeysRequest) Descriptor() ([]byte, []int)
Deprecated: Use KeysRequest.ProtoReflect.Descriptor instead.
func (*KeysRequest) GetSdkId ¶
func (x *KeysRequest) GetSdkId() string
func (*KeysRequest) ProtoMessage ¶
func (*KeysRequest) ProtoMessage()
func (*KeysRequest) ProtoReflect ¶
func (x *KeysRequest) ProtoReflect() protoreflect.Message
func (*KeysRequest) Reset ¶
func (x *KeysRequest) Reset()
func (*KeysRequest) String ¶
func (x *KeysRequest) String() string
type KeysResponse ¶
type KeysResponse struct { // The keys of each feature flag. Keys []string `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty"` // contains filtered or unexported fields }
Response message that contains each available feature flag's key.
func (*KeysResponse) Descriptor
deprecated
func (*KeysResponse) Descriptor() ([]byte, []int)
Deprecated: Use KeysResponse.ProtoReflect.Descriptor instead.
func (*KeysResponse) GetKeys ¶
func (x *KeysResponse) GetKeys() []string
func (*KeysResponse) ProtoMessage ¶
func (*KeysResponse) ProtoMessage()
func (*KeysResponse) ProtoReflect ¶
func (x *KeysResponse) ProtoReflect() protoreflect.Message
func (*KeysResponse) Reset ¶
func (x *KeysResponse) Reset()
func (*KeysResponse) String ¶
func (x *KeysResponse) String() string
type RefreshRequest ¶
type RefreshRequest struct { // The SDK identifier. SdkId string `protobuf:"bytes,1,opt,name=sdk_id,json=sdkId,proto3" json:"sdk_id,omitempty"` // contains filtered or unexported fields }
Request message for the given SDK to refresh its evaluation data.
func (*RefreshRequest) Descriptor
deprecated
func (*RefreshRequest) Descriptor() ([]byte, []int)
Deprecated: Use RefreshRequest.ProtoReflect.Descriptor instead.
func (*RefreshRequest) GetSdkId ¶
func (x *RefreshRequest) GetSdkId() string
func (*RefreshRequest) ProtoMessage ¶
func (*RefreshRequest) ProtoMessage()
func (*RefreshRequest) ProtoReflect ¶
func (x *RefreshRequest) ProtoReflect() protoreflect.Message
func (*RefreshRequest) Reset ¶
func (x *RefreshRequest) Reset()
func (*RefreshRequest) String ¶
func (x *RefreshRequest) String() string
type StringList ¶ added in v0.3.0
type StringList struct { Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // contains filtered or unexported fields }
Represents a list of strings.
func (*StringList) Descriptor
deprecated
added in
v0.3.0
func (*StringList) Descriptor() ([]byte, []int)
Deprecated: Use StringList.ProtoReflect.Descriptor instead.
func (*StringList) GetValues ¶ added in v0.3.0
func (x *StringList) GetValues() []string
func (*StringList) ProtoMessage ¶ added in v0.3.0
func (*StringList) ProtoMessage()
func (*StringList) ProtoReflect ¶ added in v0.3.0
func (x *StringList) ProtoReflect() protoreflect.Message
func (*StringList) Reset ¶ added in v0.3.0
func (x *StringList) Reset()
func (*StringList) String ¶ added in v0.3.0
func (x *StringList) String() string
type UnimplementedFlagServiceServer ¶
type UnimplementedFlagServiceServer struct { }
UnimplementedFlagServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFlagServiceServer) EvalAllFlags ¶
func (UnimplementedFlagServiceServer) EvalAllFlags(context.Context, *EvalRequest) (*EvalAllResponse, error)
func (UnimplementedFlagServiceServer) EvalAllFlagsStream ¶
func (UnimplementedFlagServiceServer) EvalAllFlagsStream(*EvalRequest, FlagService_EvalAllFlagsStreamServer) error
func (UnimplementedFlagServiceServer) EvalFlag ¶
func (UnimplementedFlagServiceServer) EvalFlag(context.Context, *EvalRequest) (*EvalResponse, error)
func (UnimplementedFlagServiceServer) EvalFlagStream ¶
func (UnimplementedFlagServiceServer) EvalFlagStream(*EvalRequest, FlagService_EvalFlagStreamServer) error
func (UnimplementedFlagServiceServer) GetKeys ¶
func (UnimplementedFlagServiceServer) GetKeys(context.Context, *KeysRequest) (*KeysResponse, error)
func (UnimplementedFlagServiceServer) Refresh ¶
func (UnimplementedFlagServiceServer) Refresh(context.Context, *RefreshRequest) (*emptypb.Empty, error)
type UnsafeFlagServiceServer ¶
type UnsafeFlagServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFlagServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FlagServiceServer will result in compilation errors.
type UserValue ¶ added in v0.3.0
type UserValue struct { // Types that are assignable to Value: // // *UserValue_NumberValue // *UserValue_StringValue // *UserValue_TimeValue // *UserValue_StringListValue Value isUserValue_Value `protobuf_oneof:"value"` // contains filtered or unexported fields }
Defines the possible values that can be set in the `user` map.
func (*UserValue) Descriptor
deprecated
added in
v0.3.0
func (*UserValue) GetNumberValue ¶ added in v0.3.0
func (*UserValue) GetStringListValue ¶ added in v0.3.0
func (x *UserValue) GetStringListValue() *StringList
func (*UserValue) GetStringValue ¶ added in v0.3.0
func (*UserValue) GetTimeValue ¶ added in v0.3.0
func (x *UserValue) GetTimeValue() *timestamppb.Timestamp
func (*UserValue) ProtoMessage ¶ added in v0.3.0
func (*UserValue) ProtoMessage()
func (*UserValue) ProtoReflect ¶ added in v0.3.0
func (x *UserValue) ProtoReflect() protoreflect.Message
type UserValue_NumberValue ¶ added in v0.3.0
type UserValue_NumberValue struct {
NumberValue float64 `protobuf:"fixed64,1,opt,name=number_value,json=numberValue,proto3,oneof"`
}
type UserValue_StringListValue ¶ added in v0.3.0
type UserValue_StringListValue struct {
StringListValue *StringList `protobuf:"bytes,4,opt,name=string_list_value,json=stringListValue,proto3,oneof"`
}
type UserValue_StringValue ¶ added in v0.3.0
type UserValue_StringValue struct {
StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
}
type UserValue_TimeValue ¶ added in v0.3.0
type UserValue_TimeValue struct {
TimeValue *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=time_value,json=timeValue,proto3,oneof"`
}