server

package
v0.0.0-...-308ef3f Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_install_proto protoreflect.FileDescriptor
View Source
var File_server_proto protoreflect.FileDescriptor
View Source
var Vin_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "server.Vin",
	HandlerType: (*VinServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Vin_Version_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Install",
			Handler:       _Vin_Install_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "Reload",
			Handler:       _Vin_Reload_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "server.proto",
}

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

Functions

func RegisterVinServer

func RegisterVinServer(s grpc.ServiceRegistrar, srv VinServer)

Types

type InstallSpec

type InstallSpec struct {
	Pkg     []string `protobuf:"bytes,1,rep,name=pkg,proto3" json:"pkg,omitempty"`
	Version string   `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Force   bool     `protobuf:"varint,3,opt,name=force,proto3" json:"force,omitempty"`
	// contains filtered or unexported fields
}

InstallSpec contains data pertaining to installing packages.

InstallSpec messages are sent via `vin install package [-v 1.0.0]`

func (*InstallSpec) Descriptor deprecated

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

Deprecated: Use InstallSpec.ProtoReflect.Descriptor instead.

func (*InstallSpec) GetForce

func (x *InstallSpec) GetForce() bool

func (*InstallSpec) GetPkg

func (x *InstallSpec) GetPkg() []string

func (*InstallSpec) GetVersion

func (x *InstallSpec) GetVersion() string

func (*InstallSpec) ProtoMessage

func (*InstallSpec) ProtoMessage()

func (*InstallSpec) ProtoReflect

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

func (*InstallSpec) Reset

func (x *InstallSpec) Reset()

func (*InstallSpec) String

func (x *InstallSpec) String() string

type Output

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

Output holds lines of text to print/ store in a log/ slurp/ whatever

func (*Output) Descriptor deprecated

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

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetLine

func (x *Output) GetLine() string

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

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

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

type OutputReceiver

type OutputReceiver interface {
	Recv() (*Output, error)
}

OutputReceiver receives a stream of Output from a server

type OutputSender

type OutputSender interface {
	Send(*Output) error
}

OutputSender streams Output from server to client

type UnimplementedVinServer

type UnimplementedVinServer struct {
}

UnimplementedVinServer must be embedded to have forward compatible implementations.

func (UnimplementedVinServer) Install

func (UnimplementedVinServer) Reload

func (UnimplementedVinServer) Version

type UnsafeVinServer

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

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

type VersionMessage

type VersionMessage struct {
	Ref       string `protobuf:"bytes,1,opt,name=ref,proto3" json:"ref,omitempty"`
	BuildUser string `protobuf:"bytes,2,opt,name=build_user,json=buildUser,proto3" json:"build_user,omitempty"`
	// We store this as a string, rather than a datetime, because
	// we never need to do anything clever with it, beyond showing it
	BuiltOn string `protobuf:"bytes,3,opt,name=built_on,json=builtOn,proto3" json:"built_on,omitempty"`
	// contains filtered or unexported fields
}

Version holds contains data pertaining to the version of vind which is running

func (*VersionMessage) Descriptor deprecated

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

Deprecated: Use VersionMessage.ProtoReflect.Descriptor instead.

func (*VersionMessage) GetBuildUser

func (x *VersionMessage) GetBuildUser() string

func (*VersionMessage) GetBuiltOn

func (x *VersionMessage) GetBuiltOn() string

func (*VersionMessage) GetRef

func (x *VersionMessage) GetRef() string

func (*VersionMessage) ProtoMessage

func (*VersionMessage) ProtoMessage()

func (*VersionMessage) ProtoReflect

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

func (*VersionMessage) Reset

func (x *VersionMessage) Reset()

func (*VersionMessage) String

func (x *VersionMessage) String() string

type VinClient

type VinClient interface {
	Install(ctx context.Context, in *InstallSpec, opts ...grpc.CallOption) (Vin_InstallClient, error)
	Reload(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Vin_ReloadClient, error)
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*VersionMessage, error)
}

VinClient is the client API for Vin 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 NewVinClient

func NewVinClient(cc grpc.ClientConnInterface) VinClient

type VinServer

type VinServer interface {
	Install(*InstallSpec, Vin_InstallServer) error
	Reload(*emptypb.Empty, Vin_ReloadServer) error
	Version(context.Context, *emptypb.Empty) (*VersionMessage, error)
	// contains filtered or unexported methods
}

VinServer is the server API for Vin service. All implementations must embed UnimplementedVinServer for forward compatibility

type Vin_InstallClient

type Vin_InstallClient interface {
	Recv() (*Output, error)
	grpc.ClientStream
}

type Vin_InstallServer

type Vin_InstallServer interface {
	Send(*Output) error
	grpc.ServerStream
}

type Vin_ReloadClient

type Vin_ReloadClient interface {
	Recv() (*Output, error)
	grpc.ClientStream
}

type Vin_ReloadServer

type Vin_ReloadServer interface {
	Send(*Output) error
	grpc.ServerStream
}

Jump to

Keyboard shortcuts

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