go-plugin: github.com/hashicorp/go-plugin/internal/plugin Index | Files

package plugin

import "github.com/hashicorp/go-plugin/internal/plugin"

Index

Package Files

gen.go grpc_broker.pb.go grpc_controller.pb.go grpc_stdio.pb.go

Variables

var StdioData_Channel_name = map[int32]string{
    0:  "INVALID",
    1:  "STDOUT",
    2:  "STDERR",
}
var StdioData_Channel_value = map[string]int32{
    "INVALID": 0,
    "STDOUT":  1,
    "STDERR":  2,
}

func RegisterGRPCBrokerServer Uses

func RegisterGRPCBrokerServer(s *grpc.Server, srv GRPCBrokerServer)

func RegisterGRPCControllerServer Uses

func RegisterGRPCControllerServer(s *grpc.Server, srv GRPCControllerServer)

func RegisterGRPCStdioServer Uses

func RegisterGRPCStdioServer(s *grpc.Server, srv GRPCStdioServer)

type ConnInfo Uses

type ConnInfo struct {
    ServiceId            uint32   `protobuf:"varint,1,opt,name=service_id,json=serviceId,proto3" json:"service_id,omitempty"`
    Network              string   `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"`
    Address              string   `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"`
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*ConnInfo) Descriptor Uses

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

func (*ConnInfo) GetAddress Uses

func (m *ConnInfo) GetAddress() string

func (*ConnInfo) GetNetwork Uses

func (m *ConnInfo) GetNetwork() string

func (*ConnInfo) GetServiceId Uses

func (m *ConnInfo) GetServiceId() uint32

func (*ConnInfo) ProtoMessage Uses

func (*ConnInfo) ProtoMessage()

func (*ConnInfo) Reset Uses

func (m *ConnInfo) Reset()

func (*ConnInfo) String Uses

func (m *ConnInfo) String() string

func (*ConnInfo) XXX_DiscardUnknown Uses

func (m *ConnInfo) XXX_DiscardUnknown()

func (*ConnInfo) XXX_Marshal Uses

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

func (*ConnInfo) XXX_Merge Uses

func (dst *ConnInfo) XXX_Merge(src proto.Message)

func (*ConnInfo) XXX_Size Uses

func (m *ConnInfo) XXX_Size() int

func (*ConnInfo) XXX_Unmarshal Uses

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

type Empty Uses

type Empty struct {
    XXX_NoUnkeyedLiteral struct{} `json:"-"`
    XXX_unrecognized     []byte   `json:"-"`
    XXX_sizecache        int32    `json:"-"`
}

func (*Empty) Descriptor Uses

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

func (*Empty) ProtoMessage Uses

func (*Empty) ProtoMessage()

func (*Empty) Reset Uses

func (m *Empty) Reset()

func (*Empty) String Uses

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown Uses

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal Uses

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

func (*Empty) XXX_Merge Uses

func (dst *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size Uses

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal Uses

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

type GRPCBrokerClient Uses

type GRPCBrokerClient interface {
    StartStream(ctx context.Context, opts ...grpc.CallOption) (GRPCBroker_StartStreamClient, error)
}

GRPCBrokerClient is the client API for GRPCBroker service.

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

func NewGRPCBrokerClient Uses

func NewGRPCBrokerClient(cc *grpc.ClientConn) GRPCBrokerClient

type GRPCBrokerServer Uses

type GRPCBrokerServer interface {
    StartStream(GRPCBroker_StartStreamServer) error
}

GRPCBrokerServer is the server API for GRPCBroker service.

type GRPCBroker_StartStreamClient Uses

type GRPCBroker_StartStreamClient interface {
    Send(*ConnInfo) error
    Recv() (*ConnInfo, error)
    grpc.ClientStream
}

type GRPCBroker_StartStreamServer Uses

type GRPCBroker_StartStreamServer interface {
    Send(*ConnInfo) error
    Recv() (*ConnInfo, error)
    grpc.ServerStream
}

type GRPCControllerClient Uses

type GRPCControllerClient interface {
    Shutdown(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error)
}

GRPCControllerClient is the client API for GRPCController service.

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

func NewGRPCControllerClient Uses

func NewGRPCControllerClient(cc *grpc.ClientConn) GRPCControllerClient

type GRPCControllerServer Uses

type GRPCControllerServer interface {
    Shutdown(context.Context, *Empty) (*Empty, error)
}

GRPCControllerServer is the server API for GRPCController service.

type GRPCStdioClient Uses

type GRPCStdioClient interface {
    // StreamStdio returns a stream that contains all the stdout/stderr.
    // This RPC endpoint must only be called ONCE. Once stdio data is consumed
    // it is not sent again.
    //
    // Callers should connect early to prevent blocking on the plugin process.
    StreamStdio(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (GRPCStdio_StreamStdioClient, error)
}

GRPCStdioClient is the client API for GRPCStdio service.

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

func NewGRPCStdioClient Uses

func NewGRPCStdioClient(cc *grpc.ClientConn) GRPCStdioClient

type GRPCStdioServer Uses

type GRPCStdioServer interface {
    // StreamStdio returns a stream that contains all the stdout/stderr.
    // This RPC endpoint must only be called ONCE. Once stdio data is consumed
    // it is not sent again.
    //
    // Callers should connect early to prevent blocking on the plugin process.
    StreamStdio(*empty.Empty, GRPCStdio_StreamStdioServer) error
}

GRPCStdioServer is the server API for GRPCStdio service.

type GRPCStdio_StreamStdioClient Uses

type GRPCStdio_StreamStdioClient interface {
    Recv() (*StdioData, error)
    grpc.ClientStream
}

type GRPCStdio_StreamStdioServer Uses

type GRPCStdio_StreamStdioServer interface {
    Send(*StdioData) error
    grpc.ServerStream
}

type StdioData Uses

type StdioData struct {
    Channel              StdioData_Channel `protobuf:"varint,1,opt,name=channel,proto3,enum=plugin.StdioData_Channel" json:"channel,omitempty"`
    Data                 []byte            `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
    XXX_NoUnkeyedLiteral struct{}          `json:"-"`
    XXX_unrecognized     []byte            `json:"-"`
    XXX_sizecache        int32             `json:"-"`
}

StdioData is a single chunk of stdout or stderr data that is streamed from GRPCStdio.

func (*StdioData) Descriptor Uses

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

func (*StdioData) GetChannel Uses

func (m *StdioData) GetChannel() StdioData_Channel

func (*StdioData) GetData Uses

func (m *StdioData) GetData() []byte

func (*StdioData) ProtoMessage Uses

func (*StdioData) ProtoMessage()

func (*StdioData) Reset Uses

func (m *StdioData) Reset()

func (*StdioData) String Uses

func (m *StdioData) String() string

func (*StdioData) XXX_DiscardUnknown Uses

func (m *StdioData) XXX_DiscardUnknown()

func (*StdioData) XXX_Marshal Uses

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

func (*StdioData) XXX_Merge Uses

func (dst *StdioData) XXX_Merge(src proto.Message)

func (*StdioData) XXX_Size Uses

func (m *StdioData) XXX_Size() int

func (*StdioData) XXX_Unmarshal Uses

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

type StdioData_Channel Uses

type StdioData_Channel int32
const (
    StdioData_INVALID StdioData_Channel = 0
    StdioData_STDOUT  StdioData_Channel = 1
    StdioData_STDERR  StdioData_Channel = 2
)

func (StdioData_Channel) EnumDescriptor Uses

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

func (StdioData_Channel) String Uses

func (x StdioData_Channel) String() string

Package plugin imports 6 packages (graph) and is imported by 7 packages. Updated 2020-03-06. Refresh now. Tools for package owners.