actionplugin

package
v0.54.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: BSD-3-Clause Imports: 16 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterActionPluginServer

func RegisterActionPluginServer(s *grpc.Server, srv ActionPluginServer)

func Start

func Start(ctx context.Context, srv ActionPluginServer) error

Start is useful to start grpcplugin

Types

type ActionPluginClient

type ActionPluginClient interface {
	Manifest(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ActionPluginManifest, error)
	Run(ctx context.Context, in *ActionQuery, opts ...grpc.CallOption) (*ActionResult, error)
	WorkerHTTPPort(ctx context.Context, in *WorkerHTTPPortQuery, opts ...grpc.CallOption) (*empty.Empty, error)
	Stop(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
}

ActionPluginClient is the client API for ActionPlugin service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func Client

func Client(ctx context.Context, socket string) (ActionPluginClient, error)

Client gives us a grpcplugin client

type ActionPluginManifest

type ActionPluginManifest struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Version              string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Description          string   `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Author               string   `protobuf:"bytes,4,opt,name=author,proto3" json:"author,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ActionPluginManifest) Descriptor

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

func (*ActionPluginManifest) GetAuthor

func (m *ActionPluginManifest) GetAuthor() string

func (*ActionPluginManifest) GetDescription

func (m *ActionPluginManifest) GetDescription() string

func (*ActionPluginManifest) GetName

func (m *ActionPluginManifest) GetName() string

func (*ActionPluginManifest) GetVersion

func (m *ActionPluginManifest) GetVersion() string

func (*ActionPluginManifest) ProtoMessage

func (*ActionPluginManifest) ProtoMessage()

func (*ActionPluginManifest) Reset

func (m *ActionPluginManifest) Reset()

func (*ActionPluginManifest) String

func (m *ActionPluginManifest) String() string

func (*ActionPluginManifest) XXX_DiscardUnknown

func (m *ActionPluginManifest) XXX_DiscardUnknown()

func (*ActionPluginManifest) XXX_Marshal

func (m *ActionPluginManifest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActionPluginManifest) XXX_Merge

func (m *ActionPluginManifest) XXX_Merge(src proto.Message)

func (*ActionPluginManifest) XXX_Size

func (m *ActionPluginManifest) XXX_Size() int

func (*ActionPluginManifest) XXX_Unmarshal

func (m *ActionPluginManifest) XXX_Unmarshal(b []byte) error

type ActionPluginServer

type ActionPluginServer interface {
	Manifest(context.Context, *empty.Empty) (*ActionPluginManifest, error)
	Run(context.Context, *ActionQuery) (*ActionResult, error)
	WorkerHTTPPort(context.Context, *WorkerHTTPPortQuery) (*empty.Empty, error)
	Stop(context.Context, *empty.Empty) (*empty.Empty, error)
}

ActionPluginServer is the server API for ActionPlugin service.

type ActionQuery

type ActionQuery struct {
	Options              map[string]string `` /* 155-byte string literal not displayed */
	JobID                int64             `protobuf:"varint,2,opt,name=jobID,proto3" json:"jobID,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*ActionQuery) Descriptor

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

func (*ActionQuery) GetJobID

func (m *ActionQuery) GetJobID() int64

func (*ActionQuery) GetOptions

func (m *ActionQuery) GetOptions() map[string]string

func (*ActionQuery) ProtoMessage

func (*ActionQuery) ProtoMessage()

func (*ActionQuery) Reset

func (m *ActionQuery) Reset()

func (*ActionQuery) String

func (m *ActionQuery) String() string

func (*ActionQuery) XXX_DiscardUnknown

func (m *ActionQuery) XXX_DiscardUnknown()

func (*ActionQuery) XXX_Marshal

func (m *ActionQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActionQuery) XXX_Merge

func (m *ActionQuery) XXX_Merge(src proto.Message)

func (*ActionQuery) XXX_Size

func (m *ActionQuery) XXX_Size() int

func (*ActionQuery) XXX_Unmarshal

func (m *ActionQuery) XXX_Unmarshal(b []byte) error

type ActionResult

type ActionResult struct {
	Status               string   `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
	Details              string   `protobuf:"bytes,2,opt,name=details,proto3" json:"details,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func Fail

func Fail(format string, args ...interface{}) (*ActionResult, error)

func (*ActionResult) Descriptor

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

func (*ActionResult) GetDetails

func (m *ActionResult) GetDetails() string

func (*ActionResult) GetStatus

func (m *ActionResult) GetStatus() string

func (*ActionResult) ProtoMessage

func (*ActionResult) ProtoMessage()

func (*ActionResult) Reset

func (m *ActionResult) Reset()

func (*ActionResult) String

func (m *ActionResult) String() string

func (*ActionResult) XXX_DiscardUnknown

func (m *ActionResult) XXX_DiscardUnknown()

func (*ActionResult) XXX_Marshal

func (m *ActionResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ActionResult) XXX_Merge

func (m *ActionResult) XXX_Merge(src proto.Message)

func (*ActionResult) XXX_Size

func (m *ActionResult) XXX_Size() int

func (*ActionResult) XXX_Unmarshal

func (m *ActionResult) XXX_Unmarshal(b []byte) error

type Common

type Common struct {
	grpcplugin.Common

	HTTPPort   int32
	HTTPClient cdsclient.HTTPClient
	// contains filtered or unexported fields
}

Common is the common struct of actionplugin

func (*Common) DoRequest added in v0.53.1

func (c *Common) DoRequest(req *http.Request) (*http.Response, error)

func (*Common) NewRequest added in v0.53.1

func (c *Common) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error)

func (*Common) WorkerHTTPPort

func (c *Common) WorkerHTTPPort(ctx context.Context, q *WorkerHTTPPortQuery) (*empty.Empty, error)

type UnimplementedActionPluginServer

type UnimplementedActionPluginServer struct {
}

UnimplementedActionPluginServer can be embedded to have forward compatible implementations.

func (*UnimplementedActionPluginServer) Manifest

func (*UnimplementedActionPluginServer) Run

func (*UnimplementedActionPluginServer) Stop

func (*UnimplementedActionPluginServer) WorkerHTTPPort

type WorkerHTTPPortQuery

type WorkerHTTPPortQuery struct {
	Port                 int32    `protobuf:"varint,1,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WorkerHTTPPortQuery) Descriptor

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

func (*WorkerHTTPPortQuery) GetPort

func (m *WorkerHTTPPortQuery) GetPort() int32

func (*WorkerHTTPPortQuery) ProtoMessage

func (*WorkerHTTPPortQuery) ProtoMessage()

func (*WorkerHTTPPortQuery) Reset

func (m *WorkerHTTPPortQuery) Reset()

func (*WorkerHTTPPortQuery) String

func (m *WorkerHTTPPortQuery) String() string

func (*WorkerHTTPPortQuery) XXX_DiscardUnknown

func (m *WorkerHTTPPortQuery) XXX_DiscardUnknown()

func (*WorkerHTTPPortQuery) XXX_Marshal

func (m *WorkerHTTPPortQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WorkerHTTPPortQuery) XXX_Merge

func (m *WorkerHTTPPortQuery) XXX_Merge(src proto.Message)

func (*WorkerHTTPPortQuery) XXX_Size

func (m *WorkerHTTPPortQuery) XXX_Size() int

func (*WorkerHTTPPortQuery) XXX_Unmarshal

func (m *WorkerHTTPPortQuery) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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