Documentation ¶
Index ¶
- Variables
- func RegisterScalingServiceServer(s grpc.ServiceRegistrar, srv ScalingServiceServer)
- type ScalingJobStatus
- func (ScalingJobStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ScalingJobStatus) Enum() *ScalingJobStatus
- func (ScalingJobStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ScalingJobStatus) Number() protoreflect.EnumNumber
- func (x ScalingJobStatus) String() string
- func (ScalingJobStatus) Type() protoreflect.EnumType
- type ScalingRequest
- func (*ScalingRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ScalingRequest) GetDesiredStateName() string
- func (x *ScalingRequest) GetResourceName() string
- func (x *ScalingRequest) GetSource() string
- func (x *ScalingRequest) GetSync() bool
- func (*ScalingRequest) ProtoMessage()
- func (x *ScalingRequest) ProtoReflect() protoreflect.Message
- func (x *ScalingRequest) Reset()
- func (x *ScalingRequest) String() string
- type ScalingResponse
- func (*ScalingResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ScalingResponse) GetMessage() string
- func (x *ScalingResponse) GetScalingJobId() string
- func (x *ScalingResponse) GetStatus() ScalingJobStatus
- func (*ScalingResponse) ProtoMessage()
- func (x *ScalingResponse) ProtoReflect() protoreflect.Message
- func (x *ScalingResponse) Reset()
- func (x *ScalingResponse) String() string
- type ScalingServiceClient
- type ScalingServiceServer
- type UnimplementedScalingServiceServer
- type UnsafeScalingServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( ScalingJobStatus_name = map[int32]string{ 0: "JOB_UNKNOWN", 1: "JOB_ACCEPTED", 2: "JOB_RUNNING", 3: "JOB_DONE", 4: "JOB_CANCELED", 5: "JOB_IGNORED", 6: "JOB_FAILED", 7: "JOB_DONE_NOOP", } ScalingJobStatus_value = map[string]int32{ "JOB_UNKNOWN": 0, "JOB_ACCEPTED": 1, "JOB_RUNNING": 2, "JOB_DONE": 3, "JOB_CANCELED": 4, "JOB_IGNORED": 5, "JOB_FAILED": 6, "JOB_DONE_NOOP": 7, } )
Enum value maps for ScalingJobStatus.
var File_request_proto protoreflect.FileDescriptor
var ScalingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "autoscaler.ScalingService", HandlerType: (*ScalingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Up", Handler: _ScalingService_Up_Handler, }, { MethodName: "Down", Handler: _ScalingService_Down_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "request.proto", }
ScalingService_ServiceDesc is the grpc.ServiceDesc for ScalingService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterScalingServiceServer ¶
func RegisterScalingServiceServer(s grpc.ServiceRegistrar, srv ScalingServiceServer)
Types ¶
type ScalingJobStatus ¶
type ScalingJobStatus int32
ジョブのステータス
const ( ScalingJobStatus_JOB_UNKNOWN ScalingJobStatus = 0 // 不明 ScalingJobStatus_JOB_ACCEPTED ScalingJobStatus = 1 // 受付済み ScalingJobStatus_JOB_RUNNING ScalingJobStatus = 2 // 実行中 ScalingJobStatus_JOB_DONE ScalingJobStatus = 3 // 完了(ハンドラが処理を行った) ScalingJobStatus_JOB_CANCELED ScalingJobStatus = 4 // 開始前に中断 ScalingJobStatus_JOB_IGNORED ScalingJobStatus = 5 // 無視(受け入れなかった) ScalingJobStatus_JOB_FAILED ScalingJobStatus = 6 // 失敗/エラー ScalingJobStatus_JOB_DONE_NOOP ScalingJobStatus = 7 // 完了(ハンドラが何も処理しなかった) )
func (ScalingJobStatus) Descriptor ¶
func (ScalingJobStatus) Descriptor() protoreflect.EnumDescriptor
func (ScalingJobStatus) Enum ¶
func (x ScalingJobStatus) Enum() *ScalingJobStatus
func (ScalingJobStatus) EnumDescriptor
deprecated
func (ScalingJobStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ScalingJobStatus.Descriptor instead.
func (ScalingJobStatus) Number ¶
func (x ScalingJobStatus) Number() protoreflect.EnumNumber
func (ScalingJobStatus) String ¶
func (x ScalingJobStatus) String() string
func (ScalingJobStatus) Type ¶
func (ScalingJobStatus) Type() protoreflect.EnumType
type ScalingRequest ¶
type ScalingRequest struct { // 呼び出し元を示すラベル値、Coreでの処理には影響しない。デフォルト値: // "default" Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` // 操作対象のリソース名。リソース名にはCoreのコンフィギュレーションの中で定義した名前を指定する // 対応するリソース名がCoreで見つけられなかった場合はエラーを返す // // デフォルト値: "default" // デフォルト値を指定した場合はCoreのコンフィギュレーションで定義された先頭のリソースが操作対象となる ResourceName string `protobuf:"bytes,2,opt,name=resource_name,json=resourceName,proto3" json:"resource_name,omitempty"` // 希望するスケール(プランなど)につけた名前 // 特定のスケールに一気にスケールを変更したい場合に指定する // 指定する名前はCoreのコンフィギュレーションで定義しておく必要がある DesiredStateName string `protobuf:"bytes,3,opt,name=desired_state_name,json=desiredStateName,proto3" json:"desired_state_name,omitempty"` // 同期的に処理を行うか Sync bool `protobuf:"varint,4,opt,name=sync,proto3" json:"sync,omitempty"` // contains filtered or unexported fields }
Scalingサービスのリクエストパラメータ
func (*ScalingRequest) Descriptor
deprecated
func (*ScalingRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScalingRequest.ProtoReflect.Descriptor instead.
func (*ScalingRequest) GetDesiredStateName ¶
func (x *ScalingRequest) GetDesiredStateName() string
func (*ScalingRequest) GetResourceName ¶ added in v0.1.0
func (x *ScalingRequest) GetResourceName() string
func (*ScalingRequest) GetSource ¶
func (x *ScalingRequest) GetSource() string
func (*ScalingRequest) GetSync ¶ added in v0.15.0
func (x *ScalingRequest) GetSync() bool
func (*ScalingRequest) ProtoMessage ¶
func (*ScalingRequest) ProtoMessage()
func (*ScalingRequest) ProtoReflect ¶
func (x *ScalingRequest) ProtoReflect() protoreflect.Message
func (*ScalingRequest) Reset ¶
func (x *ScalingRequest) Reset()
func (*ScalingRequest) String ¶
func (x *ScalingRequest) String() string
type ScalingResponse ¶
type ScalingResponse struct { // スケールジョブのID // リクエストパラメータに応じてCoreがジョブを起動しIDを割り当てたもの ScalingJobId string `protobuf:"bytes,1,opt,name=scaling_job_id,json=scalingJobId,proto3" json:"scaling_job_id,omitempty"` // スケールジョブのステータス // Coreがリクエストを処理した段階のステータスを返す Status ScalingJobStatus `protobuf:"varint,2,opt,name=status,proto3,enum=autoscaler.ScalingJobStatus" json:"status,omitempty"` // Coreからのメッセージ // 何らかの事情でリクエストを受け付けられなかった場合の理由が記載される Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
Scalingサービスのレスポンス
func (*ScalingResponse) Descriptor
deprecated
func (*ScalingResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScalingResponse.ProtoReflect.Descriptor instead.
func (*ScalingResponse) GetMessage ¶
func (x *ScalingResponse) GetMessage() string
func (*ScalingResponse) GetScalingJobId ¶
func (x *ScalingResponse) GetScalingJobId() string
func (*ScalingResponse) GetStatus ¶
func (x *ScalingResponse) GetStatus() ScalingJobStatus
func (*ScalingResponse) ProtoMessage ¶
func (*ScalingResponse) ProtoMessage()
func (*ScalingResponse) ProtoReflect ¶
func (x *ScalingResponse) ProtoReflect() protoreflect.Message
func (*ScalingResponse) Reset ¶
func (x *ScalingResponse) Reset()
func (*ScalingResponse) String ¶
func (x *ScalingResponse) String() string
type ScalingServiceClient ¶
type ScalingServiceClient interface { // Up スケールアップ or スケールアウトのリクエスト Up(ctx context.Context, in *ScalingRequest, opts ...grpc.CallOption) (*ScalingResponse, error) // Down スケールダウン or スケールインのリクエスト Down(ctx context.Context, in *ScalingRequest, opts ...grpc.CallOption) (*ScalingResponse, error) }
ScalingServiceClient is the client API for ScalingService 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 NewScalingServiceClient ¶
func NewScalingServiceClient(cc grpc.ClientConnInterface) ScalingServiceClient
type ScalingServiceServer ¶
type ScalingServiceServer interface { // Up スケールアップ or スケールアウトのリクエスト Up(context.Context, *ScalingRequest) (*ScalingResponse, error) // Down スケールダウン or スケールインのリクエスト Down(context.Context, *ScalingRequest) (*ScalingResponse, error) // contains filtered or unexported methods }
ScalingServiceServer is the server API for ScalingService service. All implementations must embed UnimplementedScalingServiceServer for forward compatibility
type UnimplementedScalingServiceServer ¶
type UnimplementedScalingServiceServer struct { }
UnimplementedScalingServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedScalingServiceServer) Down ¶
func (UnimplementedScalingServiceServer) Down(context.Context, *ScalingRequest) (*ScalingResponse, error)
func (UnimplementedScalingServiceServer) Up ¶
func (UnimplementedScalingServiceServer) Up(context.Context, *ScalingRequest) (*ScalingResponse, error)
type UnsafeScalingServiceServer ¶
type UnsafeScalingServiceServer interface {
// contains filtered or unexported methods
}
UnsafeScalingServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScalingServiceServer will result in compilation errors.