pluginv1

package
v1.11.5 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PluginRuntimeService_ResolveActionContext_FullMethodName = "/ecmdb.plugin.v1.PluginRuntimeService/ResolveActionContext"
	PluginRuntimeService_RegisterPlugin_FullMethodName       = "/ecmdb.plugin.v1.PluginRuntimeService/RegisterPlugin"
)

Variables

View Source
var File_ecmdb_plugin_v1_plugin_proto protoreflect.FileDescriptor
View Source
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.

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 (*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 (*ResolveActionContextResponse) Reset

func (x *ResolveActionContextResponse) Reset()

func (*ResolveActionContextResponse) 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) ResolveActionContext

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.

Jump to

Keyboard shortcuts

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