v1

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const ManifestDigestKey = "manifest-digest"

Variables

View Source
var (
	PatchOp_name = map[int32]string{
		0: "NONE",
		1: "UPDATE",
		2: "CREATE",
		3: "REMOVE",
	}
	PatchOp_value = map[string]int32{
		"NONE":   0,
		"UPDATE": 1,
		"CREATE": 2,
		"REMOVE": 3,
	}
)

Enum value maps for PatchOp.

View Source
var File_github_com_rancher_opni_pkg_apis_control_v1_local_proto protoreflect.FileDescriptor
View Source
var File_github_com_rancher_opni_pkg_apis_control_v1_remote_proto protoreflect.FileDescriptor
View Source
var HealthListener_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.HealthListener",
	HandlerType: (*HealthListenerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UpdateHealth",
			Handler:    _HealthListener_UpdateHealth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/remote.proto",
}

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

View Source
var Health_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.Health",
	HandlerType: (*HealthServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetHealth",
			Handler:    _Health_GetHealth_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/remote.proto",
}

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

View Source
var Identity_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.Identity",
	HandlerType: (*IdentityServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Whoami",
			Handler:    _Identity_Whoami_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/local.proto",
}

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

View Source
var PluginManifest_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.PluginManifest",
	HandlerType: (*PluginManifestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendManifestsOrKnownPatch",
			Handler:    _PluginManifest_SendManifestsOrKnownPatch_Handler,
		},
		{
			MethodName: "GetPluginManifests",
			Handler:    _PluginManifest_GetPluginManifests_Handler,
		},
		{
			MethodName: "UploadPatch",
			Handler:    _PluginManifest_UploadPatch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/remote.proto",
}

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

Functions

func RegisterHealthListenerServer added in v0.6.0

func RegisterHealthListenerServer(s grpc.ServiceRegistrar, srv HealthListenerServer)

func RegisterHealthServer added in v0.6.0

func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer)

func RegisterIdentityServer added in v0.6.0

func RegisterIdentityServer(s grpc.ServiceRegistrar, srv IdentityServer)

func RegisterPluginManifestServer added in v0.6.0

func RegisterPluginManifestServer(s grpc.ServiceRegistrar, srv PluginManifestServer)

Types

type CompressedManifest added in v0.6.0

type CompressedManifest struct {
	AttachedMetadata *string `protobuf:"bytes,1,opt,name=attachedMetadata,proto3,oneof" json:"attachedMetadata,omitempty"`
	// CompressionMethod comprMethod = 2;
	DataAndInfo *ManifestData `protobuf:"bytes,3,opt,name=dataAndInfo,proto3" json:"dataAndInfo,omitempty"`
	// contains filtered or unexported fields
}

func (*CompressedManifest) Descriptor deprecated added in v0.6.0

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

Deprecated: Use CompressedManifest.ProtoReflect.Descriptor instead.

func (*CompressedManifest) GetAttachedMetadata added in v0.6.0

func (x *CompressedManifest) GetAttachedMetadata() string

func (*CompressedManifest) GetDataAndInfo added in v0.6.0

func (x *CompressedManifest) GetDataAndInfo() *ManifestData

func (*CompressedManifest) ProtoMessage added in v0.6.0

func (*CompressedManifest) ProtoMessage()

func (*CompressedManifest) ProtoReflect added in v0.6.0

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

func (*CompressedManifest) Reset added in v0.6.0

func (x *CompressedManifest) Reset()

func (*CompressedManifest) String added in v0.6.0

func (x *CompressedManifest) String() string

func (*CompressedManifest) Validate added in v0.6.0

func (c *CompressedManifest) Validate() error

type CompressedManifests added in v0.6.0

type CompressedManifests struct {
	Items map[string]*ManifestData `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*CompressedManifests) Descriptor deprecated added in v0.6.0

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

Deprecated: Use CompressedManifests.ProtoReflect.Descriptor instead.

func (*CompressedManifests) GetItems added in v0.6.0

func (x *CompressedManifests) GetItems() map[string]*ManifestData

func (*CompressedManifests) ProtoMessage added in v0.6.0

func (*CompressedManifests) ProtoMessage()

func (*CompressedManifests) ProtoReflect added in v0.6.0

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

func (*CompressedManifests) Reset added in v0.6.0

func (x *CompressedManifests) Reset()

func (*CompressedManifests) String added in v0.6.0

func (x *CompressedManifests) String() string

type HealthClient added in v0.6.0

type HealthClient interface {
	GetHealth(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.Health, error)
}

HealthClient is the client API for Health 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 NewHealthClient added in v0.6.0

func NewHealthClient(cc grpc.ClientConnInterface) HealthClient

type HealthListenerClient added in v0.6.0

type HealthListenerClient interface {
	UpdateHealth(ctx context.Context, in *v1.Health, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

HealthListenerClient is the client API for HealthListener 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 NewHealthListenerClient added in v0.6.0

func NewHealthListenerClient(cc grpc.ClientConnInterface) HealthListenerClient

type HealthListenerServer added in v0.6.0

type HealthListenerServer interface {
	UpdateHealth(context.Context, *v1.Health) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

HealthListenerServer is the server API for HealthListener service. All implementations must embed UnimplementedHealthListenerServer for forward compatibility

type HealthServer added in v0.6.0

type HealthServer interface {
	GetHealth(context.Context, *emptypb.Empty) (*v1.Health, error)
	// contains filtered or unexported methods
}

HealthServer is the server API for Health service. All implementations must embed UnimplementedHealthServer for forward compatibility

type IdentityClient added in v0.6.0

type IdentityClient interface {
	Whoami(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.Reference, error)
}

IdentityClient is the client API for Identity 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 NewIdentityClient added in v0.6.0

func NewIdentityClient(cc grpc.ClientConnInterface) IdentityClient

type IdentityServer added in v0.6.0

type IdentityServer interface {
	Whoami(context.Context, *emptypb.Empty) (*v1.Reference, error)
	// contains filtered or unexported methods
}

IdentityServer is the server API for Identity service. All implementations must embed UnimplementedIdentityServer for forward compatibility

type ManifestData added in v0.6.0

type ManifestData struct {
	Data    []byte  `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	OpPath  string  `protobuf:"bytes,2,opt,name=opPath,proto3" json:"opPath,omitempty"`
	Op      PatchOp `protobuf:"varint,3,opt,name=op,proto3,enum=control.PatchOp" json:"op,omitempty"`
	IsPatch bool    `protobuf:"varint,4,opt,name=isPatch,proto3" json:"isPatch,omitempty"`
	OldHash string  `protobuf:"bytes,5,opt,name=oldHash,proto3" json:"oldHash,omitempty"`
	NewHash string  `protobuf:"bytes,6,opt,name=newHash,proto3" json:"newHash,omitempty"`
	// If the server wants the agent to compute a patch and upload it, this will be true.
	RequestPatchUpload bool `protobuf:"varint,7,opt,name=requestPatchUpload,proto3" json:"requestPatchUpload,omitempty"`
	// contains filtered or unexported fields
}

func (*ManifestData) Descriptor deprecated added in v0.6.0

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

Deprecated: Use ManifestData.ProtoReflect.Descriptor instead.

func (*ManifestData) GetData added in v0.6.0

func (x *ManifestData) GetData() []byte

func (*ManifestData) GetIsPatch added in v0.6.0

func (x *ManifestData) GetIsPatch() bool

func (*ManifestData) GetNewHash added in v0.6.0

func (x *ManifestData) GetNewHash() string

func (*ManifestData) GetOldHash added in v0.6.0

func (x *ManifestData) GetOldHash() string

func (*ManifestData) GetOp added in v0.6.0

func (x *ManifestData) GetOp() PatchOp

func (*ManifestData) GetOpPath added in v0.6.0

func (x *ManifestData) GetOpPath() string

func (*ManifestData) GetRequestPatchUpload added in v0.6.0

func (x *ManifestData) GetRequestPatchUpload() bool

func (*ManifestData) ProtoMessage added in v0.6.0

func (*ManifestData) ProtoMessage()

func (*ManifestData) ProtoReflect added in v0.6.0

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

func (*ManifestData) Reset added in v0.6.0

func (x *ManifestData) Reset()

func (*ManifestData) String added in v0.6.0

func (x *ManifestData) String() string

type ManifestList added in v0.6.0

type ManifestList struct {

	// !!! plugin name -> bytes, not plugin path -> bytes
	Manifests map[string]*CompressedManifest `` /* 159-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ManifestList) Descriptor deprecated added in v0.6.0

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

Deprecated: Use ManifestList.ProtoReflect.Descriptor instead.

func (*ManifestList) GetManifests added in v0.6.0

func (x *ManifestList) GetManifests() map[string]*CompressedManifest

func (*ManifestList) ProtoMessage added in v0.6.0

func (*ManifestList) ProtoMessage()

func (*ManifestList) ProtoReflect added in v0.6.0

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

func (*ManifestList) Reset added in v0.6.0

func (x *ManifestList) Reset()

func (*ManifestList) String added in v0.6.0

func (x *ManifestList) String() string

func (*ManifestList) Validate added in v0.6.0

func (m *ManifestList) Validate() error

type ManifestMetadata added in v0.6.0

type ManifestMetadata struct {
	Hash     string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	Path     string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Revision string `protobuf:"bytes,3,opt,name=revision,proto3" json:"revision,omitempty"`
	// contains filtered or unexported fields
}

func (*ManifestMetadata) Descriptor deprecated added in v0.6.0

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

Deprecated: Use ManifestMetadata.ProtoReflect.Descriptor instead.

func (*ManifestMetadata) GetHash added in v0.6.0

func (x *ManifestMetadata) GetHash() string

func (*ManifestMetadata) GetPath added in v0.6.0

func (x *ManifestMetadata) GetPath() string

func (*ManifestMetadata) GetRevision added in v0.6.0

func (x *ManifestMetadata) GetRevision() string

func (*ManifestMetadata) ProtoMessage added in v0.6.0

func (*ManifestMetadata) ProtoMessage()

func (*ManifestMetadata) ProtoReflect added in v0.6.0

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

func (*ManifestMetadata) Reset added in v0.6.0

func (x *ManifestMetadata) Reset()

func (*ManifestMetadata) String added in v0.6.0

func (x *ManifestMetadata) String() string

func (*ManifestMetadata) Validate added in v0.6.0

func (m *ManifestMetadata) Validate() error

type ManifestMetadataList added in v0.6.0

type ManifestMetadataList struct {

	// CompressionMethod reqCompr = 1;
	Items map[string]*ManifestMetadata `` /* 151-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ManifestMetadataList) Descriptor deprecated added in v0.6.0

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

Deprecated: Use ManifestMetadataList.ProtoReflect.Descriptor instead.

func (*ManifestMetadataList) Digest added in v0.6.0

func (m *ManifestMetadataList) Digest() string

Returns a hash of the manifest metadata list. This can be used to compare manifests between the gateway and agent.

func (*ManifestMetadataList) GetItems added in v0.6.0

func (x *ManifestMetadataList) GetItems() map[string]*ManifestMetadata

func (*ManifestMetadataList) LeftJoinOn added in v0.6.0

func (m *ManifestMetadataList) LeftJoinOn(other *ManifestMetadataList) (*PatchList, error)

func (*ManifestMetadataList) ProtoMessage added in v0.6.0

func (*ManifestMetadataList) ProtoMessage()

func (*ManifestMetadataList) ProtoReflect added in v0.6.0

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

func (*ManifestMetadataList) Reset added in v0.6.0

func (x *ManifestMetadataList) Reset()

func (*ManifestMetadataList) String added in v0.6.0

func (x *ManifestMetadataList) String() string

func (*ManifestMetadataList) Validate added in v0.6.0

func (m *ManifestMetadataList) Validate() error

type PatchInfo added in v0.6.0

type PatchInfo struct {
	Op        PatchOp
	OurPath   string
	TheirPath string
	NewHash   string
	OldHash   string
}

type PatchList added in v0.6.1

type PatchList struct {
	// pluginPath to  operation
	Items map[string]PatchInfo
}

type PatchOp added in v0.6.0

type PatchOp int32
const (
	// revisions match
	PatchOp_NONE PatchOp = 0
	// same plugin exists on both
	PatchOp_UPDATE PatchOp = 1
	// missing plugin on agent
	PatchOp_CREATE PatchOp = 2
	// outdate plugin on agent, with no version on the gateway
	PatchOp_REMOVE PatchOp = 3
)

func (PatchOp) Descriptor added in v0.6.0

func (PatchOp) Descriptor() protoreflect.EnumDescriptor

func (PatchOp) Enum added in v0.6.0

func (x PatchOp) Enum() *PatchOp

func (PatchOp) EnumDescriptor deprecated added in v0.6.0

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

Deprecated: Use PatchOp.Descriptor instead.

func (PatchOp) Number added in v0.6.0

func (x PatchOp) Number() protoreflect.EnumNumber

func (PatchOp) String added in v0.6.0

func (x PatchOp) String() string

func (PatchOp) Type added in v0.6.0

func (PatchOp) Type() protoreflect.EnumType

type PatchSpec added in v0.6.0

type PatchSpec struct {
	PluginName string `protobuf:"bytes,1,opt,name=pluginName,proto3" json:"pluginName,omitempty"`
	OldHash    string `protobuf:"bytes,2,opt,name=oldHash,proto3" json:"oldHash,omitempty"`
	NewHash    string `protobuf:"bytes,3,opt,name=newHash,proto3" json:"newHash,omitempty"`
	Patch      []byte `protobuf:"bytes,4,opt,name=patch,proto3" json:"patch,omitempty"`
	// contains filtered or unexported fields
}

func (*PatchSpec) Descriptor deprecated added in v0.6.0

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

Deprecated: Use PatchSpec.ProtoReflect.Descriptor instead.

func (*PatchSpec) GetNewHash added in v0.6.0

func (x *PatchSpec) GetNewHash() string

func (*PatchSpec) GetOldHash added in v0.6.0

func (x *PatchSpec) GetOldHash() string

func (*PatchSpec) GetPatch added in v0.6.0

func (x *PatchSpec) GetPatch() []byte

func (*PatchSpec) GetPluginName added in v0.6.0

func (x *PatchSpec) GetPluginName() string

func (*PatchSpec) ProtoMessage added in v0.6.0

func (*PatchSpec) ProtoMessage()

func (*PatchSpec) ProtoReflect added in v0.6.0

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

func (*PatchSpec) Reset added in v0.6.0

func (x *PatchSpec) Reset()

func (*PatchSpec) String added in v0.6.0

func (x *PatchSpec) String() string

func (*PatchSpec) Validate added in v0.6.0

func (x *PatchSpec) Validate() error

type PluginManifestClient added in v0.6.0

type PluginManifestClient interface {
	SendManifestsOrKnownPatch(ctx context.Context, in *ManifestMetadataList, opts ...grpc.CallOption) (*ManifestList, error)
	GetPluginManifests(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ManifestMetadataList, error)
	UploadPatch(ctx context.Context, in *PatchSpec, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

PluginManifestClient is the client API for PluginManifest 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 NewPluginManifestClient added in v0.6.0

func NewPluginManifestClient(cc grpc.ClientConnInterface) PluginManifestClient

type PluginManifestServer added in v0.6.0

type PluginManifestServer interface {
	SendManifestsOrKnownPatch(context.Context, *ManifestMetadataList) (*ManifestList, error)
	GetPluginManifests(context.Context, *emptypb.Empty) (*ManifestMetadataList, error)
	UploadPatch(context.Context, *PatchSpec) (*emptypb.Empty, error)
	// contains filtered or unexported methods
}

PluginManifestServer is the server API for PluginManifest service. All implementations must embed UnimplementedPluginManifestServer for forward compatibility

type UnimplementedHealthListenerServer added in v0.6.0

type UnimplementedHealthListenerServer struct {
}

UnimplementedHealthListenerServer must be embedded to have forward compatible implementations.

func (UnimplementedHealthListenerServer) UpdateHealth added in v0.6.0

type UnimplementedHealthServer added in v0.6.0

type UnimplementedHealthServer struct {
}

UnimplementedHealthServer must be embedded to have forward compatible implementations.

func (UnimplementedHealthServer) GetHealth added in v0.6.0

type UnimplementedIdentityServer added in v0.6.0

type UnimplementedIdentityServer struct {
}

UnimplementedIdentityServer must be embedded to have forward compatible implementations.

func (UnimplementedIdentityServer) Whoami added in v0.6.0

type UnimplementedPluginManifestServer added in v0.6.0

type UnimplementedPluginManifestServer struct {
}

UnimplementedPluginManifestServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginManifestServer) GetPluginManifests added in v0.6.0

func (UnimplementedPluginManifestServer) SendManifestsOrKnownPatch added in v0.6.0

func (UnimplementedPluginManifestServer) UploadPatch added in v0.6.0

type UnsafeHealthListenerServer added in v0.6.0

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

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

type UnsafeHealthServer added in v0.6.0

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

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

type UnsafeIdentityServer added in v0.6.0

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

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

type UnsafePluginManifestServer added in v0.6.0

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

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

Jump to

Keyboard shortcuts

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