pb

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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 (
	PluginService_Health_FullMethodName = "/wloop.plugin.v1.PluginService/Health"
	PluginService_Start_FullMethodName  = "/wloop.plugin.v1.PluginService/Start"
	PluginService_Stop_FullMethodName   = "/wloop.plugin.v1.PluginService/Stop"
	PluginService_Notify_FullMethodName = "/wloop.plugin.v1.PluginService/Notify"
)

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "STATUS_UNSPECIFIED",
		1: "STATUS_LOADING",
		2: "STATUS_SERVING",
		3: "STATUS_DEGRADED",
	}
	Status_value = map[string]int32{
		"STATUS_UNSPECIFIED": 0,
		"STATUS_LOADING":     1,
		"STATUS_SERVING":     2,
		"STATUS_DEGRADED":    3,
	}
)

Enum value maps for Status.

View Source
var File_wloop_plugin_v1_plugin_proto protoreflect.FileDescriptor
View Source
var PluginService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "wloop.plugin.v1.PluginService",
	HandlerType: (*PluginServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Health",
			Handler:    _PluginService_Health_Handler,
		},
		{
			MethodName: "Start",
			Handler:    _PluginService_Start_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _PluginService_Stop_Handler,
		},
		{
			MethodName: "Notify",
			Handler:    _PluginService_Notify_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "wloop/plugin/v1/plugin.proto",
}

PluginService_ServiceDesc is the grpc.ServiceDesc for PluginService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPluginServiceServer

func RegisterPluginServiceServer(s grpc.ServiceRegistrar, srv PluginServiceServer)

Types

type HealthRequest

type HealthRequest struct {
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) GetKind

func (x *HealthRequest) GetKind() string

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

func (x *HealthRequest) ProtoReflect() protoreflect.Message

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {
	Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=wloop.plugin.v1.Status" json:"status,omitempty"`
	// reason says why a kind is loading or degraded; empty while serving.
	Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthResponse) Descriptor deprecated

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

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetReason

func (x *HealthResponse) GetReason() string

func (*HealthResponse) GetStatus

func (x *HealthResponse) GetStatus() Status

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

func (x *HealthResponse) ProtoReflect() protoreflect.Message

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type NotifyRequest

type NotifyRequest struct {
	Kind  string  `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	Units []*Unit `protobuf:"bytes,2,rep,name=units,proto3" json:"units,omitempty"`
	// topics name the host state that changed, such as round state.
	Topics []string `protobuf:"bytes,3,rep,name=topics,proto3" json:"topics,omitempty"`
	// contains filtered or unexported fields
}

func (*NotifyRequest) Descriptor deprecated

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

Deprecated: Use NotifyRequest.ProtoReflect.Descriptor instead.

func (*NotifyRequest) GetKind

func (x *NotifyRequest) GetKind() string

func (*NotifyRequest) GetTopics

func (x *NotifyRequest) GetTopics() []string

func (*NotifyRequest) GetUnits

func (x *NotifyRequest) GetUnits() []*Unit

func (*NotifyRequest) ProtoMessage

func (*NotifyRequest) ProtoMessage()

func (*NotifyRequest) ProtoReflect

func (x *NotifyRequest) ProtoReflect() protoreflect.Message

func (*NotifyRequest) Reset

func (x *NotifyRequest) Reset()

func (*NotifyRequest) String

func (x *NotifyRequest) String() string

type NotifyResponse

type NotifyResponse struct {
	// contains filtered or unexported fields
}

func (*NotifyResponse) Descriptor deprecated

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

Deprecated: Use NotifyResponse.ProtoReflect.Descriptor instead.

func (*NotifyResponse) ProtoMessage

func (*NotifyResponse) ProtoMessage()

func (*NotifyResponse) ProtoReflect

func (x *NotifyResponse) ProtoReflect() protoreflect.Message

func (*NotifyResponse) Reset

func (x *NotifyResponse) Reset()

func (*NotifyResponse) String

func (x *NotifyResponse) String() string

type PluginServiceClient

type PluginServiceClient interface {
	// Health tells whether the kind is serving, and why not when it is not.
	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
	// Start begins the kind's background work. The host calls it once per
	// process, before any other call of the kind but Health.
	Start(ctx context.Context, in *StartRequest, opts ...grpc.CallOption) (*StartResponse, error)
	// Stop ends the kind's background work; the host kills the process after it.
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
	// Notify tells the kind that host state it reads changed for these units;
	// a kind that computes from that state reports those units again.
	Notify(ctx context.Context, in *NotifyRequest, opts ...grpc.CallOption) (*NotifyResponse, error)
}

PluginServiceClient is the client API for PluginService 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.

PluginService is the lifecycle every kind a plugin binary serves answers. One binary may serve several kinds over one connection, so every request names the kind it is for.

type PluginServiceServer

type PluginServiceServer interface {
	// Health tells whether the kind is serving, and why not when it is not.
	Health(context.Context, *HealthRequest) (*HealthResponse, error)
	// Start begins the kind's background work. The host calls it once per
	// process, before any other call of the kind but Health.
	Start(context.Context, *StartRequest) (*StartResponse, error)
	// Stop ends the kind's background work; the host kills the process after it.
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// Notify tells the kind that host state it reads changed for these units;
	// a kind that computes from that state reports those units again.
	Notify(context.Context, *NotifyRequest) (*NotifyResponse, error)
	// contains filtered or unexported methods
}

PluginServiceServer is the server API for PluginService service. All implementations must embed UnimplementedPluginServiceServer for forward compatibility.

PluginService is the lifecycle every kind a plugin binary serves answers. One binary may serve several kinds over one connection, so every request names the kind it is for.

type StartRequest

type StartRequest struct {
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// state_dir is the plugin's own state directory, which only it reads.
	StateDir string `protobuf:"bytes,2,opt,name=state_dir,json=stateDir,proto3" json:"state_dir,omitempty"`
	// host_broker is the go-plugin broker id on which the host serves the
	// kind's host services; zero when the host serves none for the kind.
	HostBroker uint32 `protobuf:"varint,3,opt,name=host_broker,json=hostBroker,proto3" json:"host_broker,omitempty"`
	// contains filtered or unexported fields
}

func (*StartRequest) Descriptor deprecated

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

Deprecated: Use StartRequest.ProtoReflect.Descriptor instead.

func (*StartRequest) GetHostBroker

func (x *StartRequest) GetHostBroker() uint32

func (*StartRequest) GetKind

func (x *StartRequest) GetKind() string

func (*StartRequest) GetStateDir

func (x *StartRequest) GetStateDir() string

func (*StartRequest) ProtoMessage

func (*StartRequest) ProtoMessage()

func (*StartRequest) ProtoReflect

func (x *StartRequest) ProtoReflect() protoreflect.Message

func (*StartRequest) Reset

func (x *StartRequest) Reset()

func (*StartRequest) String

func (x *StartRequest) String() string

type StartResponse

type StartResponse struct {
	// contains filtered or unexported fields
}

func (*StartResponse) Descriptor deprecated

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

Deprecated: Use StartResponse.ProtoReflect.Descriptor instead.

func (*StartResponse) ProtoMessage

func (*StartResponse) ProtoMessage()

func (*StartResponse) ProtoReflect

func (x *StartResponse) ProtoReflect() protoreflect.Message

func (*StartResponse) Reset

func (x *StartResponse) Reset()

func (*StartResponse) String

func (x *StartResponse) String() string

type Status

type Status int32
const (
	Status_STATUS_UNSPECIFIED Status = 0
	// STATUS_LOADING: the kind has not yet imported its data or reported every unit.
	Status_STATUS_LOADING Status = 1
	Status_STATUS_SERVING Status = 2
	// STATUS_DEGRADED: the kind serves, but a source it reads is failing.
	Status_STATUS_DEGRADED Status = 3
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

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

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

type StopRequest

type StopRequest struct {
	Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetKind

func (x *StopRequest) GetKind() string

func (*StopRequest) ProtoMessage

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect

func (x *StopRequest) ProtoReflect() protoreflect.Message

func (*StopRequest) Reset

func (x *StopRequest) Reset()

func (*StopRequest) String

func (x *StopRequest) String() string

type StopResponse

type StopResponse struct {
	// contains filtered or unexported fields
}

func (*StopResponse) Descriptor deprecated

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect

func (x *StopResponse) ProtoReflect() protoreflect.Message

func (*StopResponse) Reset

func (x *StopResponse) Reset()

func (*StopResponse) String

func (x *StopResponse) String() string

type UnimplementedPluginServiceServer

type UnimplementedPluginServiceServer struct{}

UnimplementedPluginServiceServer 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 (UnimplementedPluginServiceServer) Health

func (UnimplementedPluginServiceServer) Notify

func (UnimplementedPluginServiceServer) Start

func (UnimplementedPluginServiceServer) Stop

type Unit

type Unit struct {
	Provider string `protobuf:"bytes,1,opt,name=provider,proto3" json:"provider,omitempty"`
	Key      string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

Unit names a unit of work by its provider and the provider's key.

func (*Unit) Descriptor deprecated

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

Deprecated: Use Unit.ProtoReflect.Descriptor instead.

func (*Unit) GetKey

func (x *Unit) GetKey() string

func (*Unit) GetProvider

func (x *Unit) GetProvider() string

func (*Unit) ProtoMessage

func (*Unit) ProtoMessage()

func (*Unit) ProtoReflect

func (x *Unit) ProtoReflect() protoreflect.Message

func (*Unit) Reset

func (x *Unit) Reset()

func (*Unit) String

func (x *Unit) String() string

type UnsafePluginServiceServer

type UnsafePluginServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePluginServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PluginServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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