genproto

package
v2.0.0-...-8b94259 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EventType_name = map[int32]string{
		0: "UNKNOWN",
		1: "PING",
		2: "CONNECTED",
		3: "DISCONNECT",
		4: "PLAN_STARTED",
		5: "PLAN_FINISHED",
		6: "PLAN_INTERRUPTED",
		7: "NEXT_STAGE_STARTED",
		8: "STATS_AGGREGATE",
		9: "STATUS_REPORT",
	}
	EventType_value = map[string]int32{
		"UNKNOWN":            0,
		"PING":               1,
		"CONNECTED":          2,
		"DISCONNECT":         3,
		"PLAN_STARTED":       4,
		"PLAN_FINISHED":      5,
		"PLAN_INTERRUPTED":   6,
		"NEXT_STAGE_STARTED": 7,
		"STATS_AGGREGATE":    8,
		"STATUS_REPORT":      9,
	}
)

Enum value maps for EventType.

View Source
var File_ultron_proto protoreflect.FileDescriptor
View Source
var UltronAPI_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wosai.ultron.UltronAPI",
	HandlerType: (*UltronAPIServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Submit",
			Handler:    _UltronAPI_Submit_Handler,
		},
		{
			MethodName: "SendStatus",
			Handler:    _UltronAPI_SendStatus_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Subscribe",
			Handler:       _UltronAPI_Subscribe_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "ultron.proto",
}

UltronAPI_ServiceDesc is the grpc.ServiceDesc for UltronAPI service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterUltronAPIServer

func RegisterUltronAPIServer(s grpc.ServiceRegistrar, srv UltronAPIServer)

Types

type AttackStrategyDTO

type AttackStrategyDTO struct {
	Type           string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	AttackStrategy []byte `protobuf:"bytes,2,opt,name=attack_strategy,json=attackStrategy,proto3" json:"attack_strategy,omitempty"`
	// contains filtered or unexported fields
}

func (*AttackStrategyDTO) Descriptor deprecated

func (*AttackStrategyDTO) Descriptor() ([]byte, []int)

Deprecated: Use AttackStrategyDTO.ProtoReflect.Descriptor instead.

func (*AttackStrategyDTO) GetAttackStrategy

func (x *AttackStrategyDTO) GetAttackStrategy() []byte

func (*AttackStrategyDTO) GetType

func (x *AttackStrategyDTO) GetType() string

func (*AttackStrategyDTO) ProtoMessage

func (*AttackStrategyDTO) ProtoMessage()

func (*AttackStrategyDTO) ProtoReflect

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

func (*AttackStrategyDTO) Reset

func (x *AttackStrategyDTO) Reset()

func (*AttackStrategyDTO) String

func (x *AttackStrategyDTO) String() string

type EventType

type EventType int32
const (
	EventType_UNKNOWN            EventType = 0
	EventType_PING               EventType = 1
	EventType_CONNECTED          EventType = 2 //已连接
	EventType_DISCONNECT         EventType = 3 // 要求slave断开连接
	EventType_PLAN_STARTED       EventType = 4 // 测试计划开始
	EventType_PLAN_FINISHED      EventType = 5 // 测试计划结束
	EventType_PLAN_INTERRUPTED   EventType = 6 // 测试计划中断执行
	EventType_NEXT_STAGE_STARTED EventType = 7 // 开始执行计划中的下一阶段
	EventType_STATS_AGGREGATE    EventType = 8 // 上报统计对象
	EventType_STATUS_REPORT      EventType = 9 // 上报运行状态
)

func (EventType) Descriptor

func (EventType) Descriptor() protoreflect.EnumDescriptor

func (EventType) Enum

func (x EventType) Enum() *EventType

func (EventType) EnumDescriptor deprecated

func (EventType) EnumDescriptor() ([]byte, []int)

Deprecated: Use EventType.Descriptor instead.

func (EventType) Number

func (x EventType) Number() protoreflect.EnumNumber

func (EventType) String

func (x EventType) String() string

func (EventType) Type

type SendStatusRequest

type SendStatusRequest struct {
	SlaveId         string `protobuf:"bytes,1,opt,name=slave_id,json=slaveId,proto3" json:"slave_id,omitempty"`
	ConcurrentUsers int32  `protobuf:"varint,2,opt,name=concurrent_users,json=concurrentUsers,proto3" json:"concurrent_users,omitempty"`
	// contains filtered or unexported fields
}

func (*SendStatusRequest) Descriptor deprecated

func (*SendStatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use SendStatusRequest.ProtoReflect.Descriptor instead.

func (*SendStatusRequest) GetConcurrentUsers

func (x *SendStatusRequest) GetConcurrentUsers() int32

func (*SendStatusRequest) GetSlaveId

func (x *SendStatusRequest) GetSlaveId() string

func (*SendStatusRequest) ProtoMessage

func (*SendStatusRequest) ProtoMessage()

func (*SendStatusRequest) ProtoReflect

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

func (*SendStatusRequest) Reset

func (x *SendStatusRequest) Reset()

func (*SendStatusRequest) String

func (x *SendStatusRequest) String() string

type SubmitRequest

type SubmitRequest struct {
	SlaveId string                           `protobuf:"bytes,1,opt,name=slave_id,json=slaveId,proto3" json:"slave_id,omitempty"`
	BatchId uint32                           `protobuf:"varint,2,opt,name=batch_id,json=batchId,proto3" json:"batch_id,omitempty"`
	Stats   *statistics.StatisticianGroupDTO `protobuf:"bytes,3,opt,name=stats,proto3" json:"stats,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitRequest) Descriptor deprecated

func (*SubmitRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubmitRequest.ProtoReflect.Descriptor instead.

func (*SubmitRequest) GetBatchId

func (x *SubmitRequest) GetBatchId() uint32

func (*SubmitRequest) GetSlaveId

func (x *SubmitRequest) GetSlaveId() string

func (*SubmitRequest) GetStats

func (*SubmitRequest) ProtoMessage

func (*SubmitRequest) ProtoMessage()

func (*SubmitRequest) ProtoReflect

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

func (*SubmitRequest) Reset

func (x *SubmitRequest) Reset()

func (*SubmitRequest) String

func (x *SubmitRequest) String() string

type SubscribeRequest

type SubscribeRequest struct {
	SlaveId string            `protobuf:"bytes,1,opt,name=slave_id,json=slaveId,proto3" json:"slave_id,omitempty"`
	Extras  map[string]string `` /* 153-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

func (*SubscribeRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetExtras

func (x *SubscribeRequest) GetExtras() map[string]string

func (*SubscribeRequest) GetSlaveId

func (x *SubscribeRequest) GetSlaveId() string

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResponse

type SubscribeResponse struct {
	Type EventType `protobuf:"varint,1,opt,name=type,proto3,enum=wosai.ultron.EventType" json:"type,omitempty"`
	// Types that are assignable to Data:
	//	*SubscribeResponse_PlanName
	//	*SubscribeResponse_AttackStrategy
	//	*SubscribeResponse_BatchId
	Data  isSubscribeResponse_Data `protobuf_oneof:"data"`
	Timer *TimerDTO                `protobuf:"bytes,5,opt,name=timer,proto3" json:"timer,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResponse) Descriptor deprecated

func (*SubscribeResponse) Descriptor() ([]byte, []int)

Deprecated: Use SubscribeResponse.ProtoReflect.Descriptor instead.

func (*SubscribeResponse) GetAttackStrategy

func (x *SubscribeResponse) GetAttackStrategy() *AttackStrategyDTO

func (*SubscribeResponse) GetBatchId

func (x *SubscribeResponse) GetBatchId() uint32

func (*SubscribeResponse) GetData

func (m *SubscribeResponse) GetData() isSubscribeResponse_Data

func (*SubscribeResponse) GetPlanName

func (x *SubscribeResponse) GetPlanName() string

func (*SubscribeResponse) GetTimer

func (x *SubscribeResponse) GetTimer() *TimerDTO

func (*SubscribeResponse) GetType

func (x *SubscribeResponse) GetType() EventType

func (*SubscribeResponse) ProtoMessage

func (*SubscribeResponse) ProtoMessage()

func (*SubscribeResponse) ProtoReflect

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

func (*SubscribeResponse) Reset

func (x *SubscribeResponse) Reset()

func (*SubscribeResponse) String

func (x *SubscribeResponse) String() string

type SubscribeResponse_AttackStrategy

type SubscribeResponse_AttackStrategy struct {
	AttackStrategy *AttackStrategyDTO `protobuf:"bytes,3,opt,name=attack_strategy,json=attackStrategy,proto3,oneof"`
}

type SubscribeResponse_BatchId

type SubscribeResponse_BatchId struct {
	BatchId uint32 `protobuf:"varint,4,opt,name=batch_id,json=batchId,proto3,oneof"`
}

type SubscribeResponse_PlanName

type SubscribeResponse_PlanName struct {
	PlanName string `protobuf:"bytes,2,opt,name=plan_name,json=planName,proto3,oneof"`
}

type TimerDTO

type TimerDTO struct {
	Type  string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Timer []byte `protobuf:"bytes,2,opt,name=timer,proto3" json:"timer,omitempty"`
	// contains filtered or unexported fields
}

func (*TimerDTO) Descriptor deprecated

func (*TimerDTO) Descriptor() ([]byte, []int)

Deprecated: Use TimerDTO.ProtoReflect.Descriptor instead.

func (*TimerDTO) GetTimer

func (x *TimerDTO) GetTimer() []byte

func (*TimerDTO) GetType

func (x *TimerDTO) GetType() string

func (*TimerDTO) ProtoMessage

func (*TimerDTO) ProtoMessage()

func (*TimerDTO) ProtoReflect

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

func (*TimerDTO) Reset

func (x *TimerDTO) Reset()

func (*TimerDTO) String

func (x *TimerDTO) String() string

type UltronAPIClient

type UltronAPIClient interface {
	Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (UltronAPI_SubscribeClient, error)
	Submit(ctx context.Context, in *SubmitRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	SendStatus(ctx context.Context, in *SendStatusRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

UltronAPIClient is the client API for UltronAPI 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 NewUltronAPIClient

func NewUltronAPIClient(cc grpc.ClientConnInterface) UltronAPIClient

type UltronAPIServer

type UltronAPIServer interface {
	Subscribe(*SubscribeRequest, UltronAPI_SubscribeServer) error
	Submit(context.Context, *SubmitRequest) (*emptypb.Empty, error)
	SendStatus(context.Context, *SendStatusRequest) (*emptypb.Empty, error)
}

UltronAPIServer is the server API for UltronAPI service. All implementations should embed UnimplementedUltronAPIServer for forward compatibility

type UltronAPI_SubscribeClient

type UltronAPI_SubscribeClient interface {
	Recv() (*SubscribeResponse, error)
	grpc.ClientStream
}

type UltronAPI_SubscribeServer

type UltronAPI_SubscribeServer interface {
	Send(*SubscribeResponse) error
	grpc.ServerStream
}

type UnimplementedUltronAPIServer

type UnimplementedUltronAPIServer struct {
}

UnimplementedUltronAPIServer should be embedded to have forward compatible implementations.

func (UnimplementedUltronAPIServer) SendStatus

func (UnimplementedUltronAPIServer) Submit

func (UnimplementedUltronAPIServer) Subscribe

type UnsafeUltronAPIServer

type UnsafeUltronAPIServer interface {
	// contains filtered or unexported methods
}

UnsafeUltronAPIServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UltronAPIServer will result in compilation errors.

Jump to

Keyboard shortcuts

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