Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterPluginRuntimeServiceServer(s grpc.ServiceRegistrar, srv PluginRuntimeServiceServer)
- type PluginRuntimeServiceClient
- type PluginRuntimeServiceServer
- type RegisterPluginRequest
- func (*RegisterPluginRequest) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterPluginRequest) GetPluginId() string
- func (x *RegisterPluginRequest) GetUpstream() string
- func (*RegisterPluginRequest) ProtoMessage()
- func (x *RegisterPluginRequest) ProtoReflect() protoreflect.Message
- func (x *RegisterPluginRequest) Reset()
- func (x *RegisterPluginRequest) String() string
- type RegisterPluginResponse
- func (*RegisterPluginResponse) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterPluginResponse) GetSuccess() bool
- func (*RegisterPluginResponse) ProtoMessage()
- func (x *RegisterPluginResponse) ProtoReflect() protoreflect.Message
- func (x *RegisterPluginResponse) Reset()
- func (x *RegisterPluginResponse) String() string
- type ResolveActionContextRequest
- func (*ResolveActionContextRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResolveActionContextRequest) GetAction() string
- func (x *ResolveActionContextRequest) GetParamsJson() []byte
- func (x *ResolveActionContextRequest) GetPluginId() string
- func (x *ResolveActionContextRequest) GetResourceId() int64
- func (*ResolveActionContextRequest) ProtoMessage()
- func (x *ResolveActionContextRequest) ProtoReflect() protoreflect.Message
- func (x *ResolveActionContextRequest) Reset()
- func (x *ResolveActionContextRequest) String() string
- type ResolveActionContextResponse
- func (*ResolveActionContextResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ResolveActionContextResponse) GetActionContextJson() []byte
- func (*ResolveActionContextResponse) ProtoMessage()
- func (x *ResolveActionContextResponse) ProtoReflect() protoreflect.Message
- func (x *ResolveActionContextResponse) Reset()
- func (x *ResolveActionContextResponse) String() string
- type UnimplementedPluginRuntimeServiceServer
- type UnsafePluginRuntimeServiceServer
Constants ¶
const ( PluginRuntimeService_ResolveActionContext_FullMethodName = "/ecmdb.plugin.v1.PluginRuntimeService/ResolveActionContext" PluginRuntimeService_RegisterPlugin_FullMethodName = "/ecmdb.plugin.v1.PluginRuntimeService/RegisterPlugin" )
Variables ¶
var File_ecmdb_plugin_v1_plugin_proto protoreflect.FileDescriptor
var PluginRuntimeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ecmdb.plugin.v1.PluginRuntimeService", HandlerType: (*PluginRuntimeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ResolveActionContext", Handler: _PluginRuntimeService_ResolveActionContext_Handler, }, { MethodName: "RegisterPlugin", Handler: _PluginRuntimeService_RegisterPlugin_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ecmdb/plugin/v1/plugin.proto", }
PluginRuntimeService_ServiceDesc is the grpc.ServiceDesc for PluginRuntimeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPluginRuntimeServiceServer ¶
func RegisterPluginRuntimeServiceServer(s grpc.ServiceRegistrar, srv PluginRuntimeServiceServer)
Types ¶
type PluginRuntimeServiceClient ¶
type PluginRuntimeServiceClient interface {
ResolveActionContext(ctx context.Context, in *ResolveActionContextRequest, opts ...grpc.CallOption) (*ResolveActionContextResponse, error)
// 插件服务动态握手注册
RegisterPlugin(ctx context.Context, in *RegisterPluginRequest, opts ...grpc.CallOption) (*RegisterPluginResponse, error)
}
PluginRuntimeServiceClient is the client API for PluginRuntimeService 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 NewPluginRuntimeServiceClient ¶
func NewPluginRuntimeServiceClient(cc grpc.ClientConnInterface) PluginRuntimeServiceClient
type PluginRuntimeServiceServer ¶
type PluginRuntimeServiceServer interface {
ResolveActionContext(context.Context, *ResolveActionContextRequest) (*ResolveActionContextResponse, error)
// 插件服务动态握手注册
RegisterPlugin(context.Context, *RegisterPluginRequest) (*RegisterPluginResponse, error)
// contains filtered or unexported methods
}
PluginRuntimeServiceServer is the server API for PluginRuntimeService service. All implementations must embed UnimplementedPluginRuntimeServiceServer for forward compatibility.
type RegisterPluginRequest ¶
type RegisterPluginRequest struct {
PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
Upstream string `protobuf:"bytes,2,opt,name=upstream,proto3" json:"upstream,omitempty"` // 插件的外网/内网可被主站访问的 HTTP 服务地址,例如 http://ssh-plugin:18080
// contains filtered or unexported fields
}
插件向主站发起主动注册请求
func (*RegisterPluginRequest) Descriptor
deprecated
func (*RegisterPluginRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterPluginRequest.ProtoReflect.Descriptor instead.
func (*RegisterPluginRequest) GetPluginId ¶
func (x *RegisterPluginRequest) GetPluginId() string
func (*RegisterPluginRequest) GetUpstream ¶
func (x *RegisterPluginRequest) GetUpstream() string
func (*RegisterPluginRequest) ProtoMessage ¶
func (*RegisterPluginRequest) ProtoMessage()
func (*RegisterPluginRequest) ProtoReflect ¶
func (x *RegisterPluginRequest) ProtoReflect() protoreflect.Message
func (*RegisterPluginRequest) Reset ¶
func (x *RegisterPluginRequest) Reset()
func (*RegisterPluginRequest) String ¶
func (x *RegisterPluginRequest) String() string
type RegisterPluginResponse ¶
type RegisterPluginResponse struct {
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
// contains filtered or unexported fields
}
插件主动注册响应
func (*RegisterPluginResponse) Descriptor
deprecated
func (*RegisterPluginResponse) Descriptor() ([]byte, []int)
Deprecated: Use RegisterPluginResponse.ProtoReflect.Descriptor instead.
func (*RegisterPluginResponse) GetSuccess ¶
func (x *RegisterPluginResponse) GetSuccess() bool
func (*RegisterPluginResponse) ProtoMessage ¶
func (*RegisterPluginResponse) ProtoMessage()
func (*RegisterPluginResponse) ProtoReflect ¶
func (x *RegisterPluginResponse) ProtoReflect() protoreflect.Message
func (*RegisterPluginResponse) Reset ¶
func (x *RegisterPluginResponse) Reset()
func (*RegisterPluginResponse) String ¶
func (x *RegisterPluginResponse) String() string
type ResolveActionContextRequest ¶
type ResolveActionContextRequest struct {
PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
ResourceId int64 `protobuf:"varint,3,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
ParamsJson []byte `protobuf:"bytes,4,opt,name=params_json,json=paramsJson,proto3" json:"params_json,omitempty"`
// contains filtered or unexported fields
}
func (*ResolveActionContextRequest) Descriptor
deprecated
func (*ResolveActionContextRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResolveActionContextRequest.ProtoReflect.Descriptor instead.
func (*ResolveActionContextRequest) GetAction ¶
func (x *ResolveActionContextRequest) GetAction() string
func (*ResolveActionContextRequest) GetParamsJson ¶
func (x *ResolveActionContextRequest) GetParamsJson() []byte
func (*ResolveActionContextRequest) GetPluginId ¶
func (x *ResolveActionContextRequest) GetPluginId() string
func (*ResolveActionContextRequest) GetResourceId ¶
func (x *ResolveActionContextRequest) GetResourceId() int64
func (*ResolveActionContextRequest) ProtoMessage ¶
func (*ResolveActionContextRequest) ProtoMessage()
func (*ResolveActionContextRequest) ProtoReflect ¶
func (x *ResolveActionContextRequest) ProtoReflect() protoreflect.Message
func (*ResolveActionContextRequest) Reset ¶
func (x *ResolveActionContextRequest) Reset()
func (*ResolveActionContextRequest) String ¶
func (x *ResolveActionContextRequest) String() string
type ResolveActionContextResponse ¶
type ResolveActionContextResponse struct {
ActionContextJson []byte `protobuf:"bytes,1,opt,name=action_context_json,json=actionContextJson,proto3" json:"action_context_json,omitempty"`
// contains filtered or unexported fields
}
func (*ResolveActionContextResponse) Descriptor
deprecated
func (*ResolveActionContextResponse) Descriptor() ([]byte, []int)
Deprecated: Use ResolveActionContextResponse.ProtoReflect.Descriptor instead.
func (*ResolveActionContextResponse) GetActionContextJson ¶
func (x *ResolveActionContextResponse) GetActionContextJson() []byte
func (*ResolveActionContextResponse) ProtoMessage ¶
func (*ResolveActionContextResponse) ProtoMessage()
func (*ResolveActionContextResponse) ProtoReflect ¶
func (x *ResolveActionContextResponse) ProtoReflect() protoreflect.Message
func (*ResolveActionContextResponse) Reset ¶
func (x *ResolveActionContextResponse) Reset()
func (*ResolveActionContextResponse) String ¶
func (x *ResolveActionContextResponse) String() string
type UnimplementedPluginRuntimeServiceServer ¶
type UnimplementedPluginRuntimeServiceServer struct{}
UnimplementedPluginRuntimeServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPluginRuntimeServiceServer) RegisterPlugin ¶
func (UnimplementedPluginRuntimeServiceServer) RegisterPlugin(context.Context, *RegisterPluginRequest) (*RegisterPluginResponse, error)
func (UnimplementedPluginRuntimeServiceServer) ResolveActionContext ¶
func (UnimplementedPluginRuntimeServiceServer) ResolveActionContext(context.Context, *ResolveActionContextRequest) (*ResolveActionContextResponse, error)
type UnsafePluginRuntimeServiceServer ¶
type UnsafePluginRuntimeServiceServer interface {
// contains filtered or unexported methods
}
UnsafePluginRuntimeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginRuntimeServiceServer will result in compilation errors.