proto

package
v0.0.0-...-2bdaebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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)

View Source
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

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) Descriptor() ([]byte, []int)

Deprecated: Use Variation.ProtoReflect.Descriptor instead.

func (*Variation) GetVariation

func (x *Variation) GetVariation() string

func (*Variation) ProtoMessage

func (*Variation) ProtoMessage()

func (*Variation) ProtoReflect

func (x *Variation) ProtoReflect() protoreflect.Message

func (*Variation) Reset

func (x *Variation) Reset()

func (*Variation) String

func (x *Variation) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL