Documentation ¶
Index ¶
- Variables
- func RegisterExperimentServer(s grpc.ServiceRegistrar, srv ExperimentServer)
- type ActivateRequest
- func (*ActivateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ActivateRequest) GetAttributes() *structpb.Struct
- func (x *ActivateRequest) GetExperimentKey() string
- func (x *ActivateRequest) GetUserId() string
- func (*ActivateRequest) ProtoMessage()
- func (x *ActivateRequest) ProtoReflect() protoreflect.Message
- func (x *ActivateRequest) Reset()
- func (x *ActivateRequest) String() string
- type ExperimentClient
- type ExperimentServer
- type UnimplementedExperimentServer
- type UnsafeExperimentServer
- type Variation
Constants ¶
This section is empty.
Variables ¶
var Experiment_ServiceDesc = grpc.ServiceDesc{ ServiceName: "experiment.Experiment", HandlerType: (*ExperimentServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Activate", Handler: _Experiment_Activate_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/experiment.proto", }
Experiment_ServiceDesc is the grpc.ServiceDesc for Experiment 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_experiment_proto protoreflect.FileDescriptor
Functions ¶
func RegisterExperimentServer ¶
func RegisterExperimentServer(s grpc.ServiceRegistrar, srv ExperimentServer)
Types ¶
type ActivateRequest ¶
type ActivateRequest struct { ExperimentKey string `protobuf:"bytes,1,opt,name=experiment_key,json=experimentKey,proto3" json:"experiment_key,omitempty"` UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` Attributes *structpb.Struct `protobuf:"bytes,3,opt,name=attributes,proto3" json:"attributes,omitempty"` // contains filtered or unexported fields }
func (*ActivateRequest) Descriptor
deprecated
func (*ActivateRequest) Descriptor() ([]byte, []int)
Deprecated: Use ActivateRequest.ProtoReflect.Descriptor instead.
func (*ActivateRequest) GetAttributes ¶
func (x *ActivateRequest) GetAttributes() *structpb.Struct
func (*ActivateRequest) GetExperimentKey ¶
func (x *ActivateRequest) GetExperimentKey() string
func (*ActivateRequest) GetUserId ¶
func (x *ActivateRequest) GetUserId() string
func (*ActivateRequest) ProtoMessage ¶
func (*ActivateRequest) ProtoMessage()
func (*ActivateRequest) ProtoReflect ¶
func (x *ActivateRequest) ProtoReflect() protoreflect.Message
func (*ActivateRequest) Reset ¶
func (x *ActivateRequest) Reset()
func (*ActivateRequest) String ¶
func (x *ActivateRequest) String() string
type ExperimentClient ¶
type ExperimentClient interface {
Activate(ctx context.Context, in *ActivateRequest, opts ...grpc.CallOption) (*Variation, error)
}
ExperimentClient is the client API for Experiment 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 NewExperimentClient ¶
func NewExperimentClient(cc grpc.ClientConnInterface) ExperimentClient
type ExperimentServer ¶
type ExperimentServer interface { Activate(context.Context, *ActivateRequest) (*Variation, error) // contains filtered or unexported methods }
ExperimentServer is the server API for Experiment service. All implementations must embed UnimplementedExperimentServer for forward compatibility
type UnimplementedExperimentServer ¶
type UnimplementedExperimentServer struct { }
UnimplementedExperimentServer must be embedded to have forward compatible implementations.
func (UnimplementedExperimentServer) Activate ¶
func (UnimplementedExperimentServer) Activate(context.Context, *ActivateRequest) (*Variation, error)
type UnsafeExperimentServer ¶
type UnsafeExperimentServer interface {
// contains filtered or unexported methods
}
UnsafeExperimentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExperimentServer will result in compilation errors.
type Variation ¶
type Variation struct { Variation string `protobuf:"bytes,1,opt,name=variation,proto3" json:"variation,omitempty"` // contains filtered or unexported fields }
func (*Variation) Descriptor
deprecated
func (*Variation) GetVariation ¶
func (*Variation) ProtoMessage ¶
func (*Variation) ProtoMessage()
func (*Variation) ProtoReflect ¶
func (x *Variation) ProtoReflect() protoreflect.Message