v1

package
v0.10.0-rc7 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ManifestDigestKey = "manifest-digest"
	AgentBuildInfoKey = "agent-build-info"
)
View Source
const (
	PluginSync_SyncPluginManifest_FullMethodName = "/control.PluginSync/SyncPluginManifest"
	PluginSync_GetPluginManifest_FullMethodName  = "/control.PluginSync/GetPluginManifest"
)
View Source
const (
	HealthListener_UpdateHealth_FullMethodName = "/control.HealthListener/UpdateHealth"
)
View Source
const (
	Health_GetHealth_FullMethodName = "/control.Health/GetHealth"
)
View Source
const (
	Identity_Whoami_FullMethodName = "/control.Identity/Whoami"
)

Variables

View Source
var (
	PatchOp_name = map[int32]string{
		0: "None",
		1: "Update",
		2: "Create",
		3: "Remove",
		4: "Rename",
	}
	PatchOp_value = map[string]int32{
		"None":   0,
		"Update": 1,
		"Create": 2,
		"Remove": 3,
		"Rename": 4,
	}
)

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 PluginSync_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.PluginSync",
	HandlerType: (*PluginSyncServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SyncPluginManifest",
			Handler:    _PluginSync_SyncPluginManifest_Handler,
		},
		{
			MethodName: "GetPluginManifest",
			Handler:    _PluginSync_GetPluginManifest_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/remote.proto",
}

PluginSync_ServiceDesc is the grpc.ServiceDesc for PluginSync 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 RegisterPluginSyncServer added in v0.8.0

func RegisterPluginSyncServer(s grpc.ServiceRegistrar, srv PluginSyncServer)

Types

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 PatchList added in v0.6.1

type PatchList struct {
	Items []*PatchSpec `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PatchList) Descriptor deprecated added in v0.8.0

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

Deprecated: Use PatchList.ProtoReflect.Descriptor instead.

func (*PatchList) GetItems added in v0.8.0

func (x *PatchList) GetItems() []*PatchSpec

func (*PatchList) ProtoMessage added in v0.8.0

func (*PatchList) ProtoMessage()

func (*PatchList) ProtoReflect added in v0.8.0

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

func (*PatchList) Reset added in v0.8.0

func (x *PatchList) Reset()

func (*PatchList) Sort added in v0.8.0

func (l *PatchList) Sort()

func (*PatchList) String added in v0.8.0

func (x *PatchList) String() string

func (*PatchList) Validate added in v0.8.0

func (a *PatchList) Validate() error

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
	// outdated plugin on agent, with no version on the gateway
	PatchOp_Remove PatchOp = 3
	// same plugin contents and module name, but the file name is different
	PatchOp_Rename PatchOp = 4
)

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 {
	Module    string  `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
	Op        PatchOp `protobuf:"varint,2,opt,name=op,proto3,enum=control.PatchOp" json:"op,omitempty"`
	Data      []byte  `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Filename  string  `protobuf:"bytes,4,opt,name=filename,proto3" json:"filename,omitempty"`
	OldDigest string  `protobuf:"bytes,5,opt,name=oldDigest,proto3" json:"oldDigest,omitempty"`
	NewDigest string  `protobuf:"bytes,6,opt,name=newDigest,proto3" json:"newDigest,omitempty"`
	// contains filtered or unexported fields
}

opPath should be empty when op == PatchRename bytes should be empty when op == PatchRemove

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

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

Deprecated: Use PatchSpec.ProtoReflect.Descriptor instead.

func (*PatchSpec) GetData added in v0.8.0

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

func (*PatchSpec) GetFilename added in v0.8.0

func (x *PatchSpec) GetFilename() string

func (*PatchSpec) GetModule added in v0.8.0

func (x *PatchSpec) GetModule() string

func (*PatchSpec) GetNewDigest added in v0.8.0

func (x *PatchSpec) GetNewDigest() string

func (*PatchSpec) GetOldDigest added in v0.8.0

func (x *PatchSpec) GetOldDigest() string

func (*PatchSpec) GetOp added in v0.8.0

func (x *PatchSpec) GetOp() PatchOp

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 (a *PatchSpec) Validate() error

type PluginArchive added in v0.8.0

type PluginArchive struct {
	Items []*PluginArchiveEntry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginArchive) Descriptor deprecated added in v0.8.0

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

Deprecated: Use PluginArchive.ProtoReflect.Descriptor instead.

func (*PluginArchive) GetItems added in v0.8.0

func (x *PluginArchive) GetItems() []*PluginArchiveEntry

func (*PluginArchive) ProtoMessage added in v0.8.0

func (*PluginArchive) ProtoMessage()

func (*PluginArchive) ProtoReflect added in v0.8.0

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

func (*PluginArchive) Reset added in v0.8.0

func (x *PluginArchive) Reset()

func (*PluginArchive) Sort added in v0.8.0

func (a *PluginArchive) Sort()

func (*PluginArchive) String added in v0.8.0

func (x *PluginArchive) String() string

func (*PluginArchive) ToManifest added in v0.8.0

func (a *PluginArchive) ToManifest() *PluginManifest

func (*PluginArchive) Validate added in v0.8.0

func (a *PluginArchive) Validate() error

type PluginArchiveEntry added in v0.8.0

type PluginArchiveEntry struct {
	Metadata *PluginManifestEntry `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Data     []byte               `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginArchiveEntry) Descriptor deprecated added in v0.8.0

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

Deprecated: Use PluginArchiveEntry.ProtoReflect.Descriptor instead.

func (*PluginArchiveEntry) GetData added in v0.8.0

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

func (*PluginArchiveEntry) GetMetadata added in v0.8.0

func (x *PluginArchiveEntry) GetMetadata() *PluginManifestEntry

func (*PluginArchiveEntry) ProtoMessage added in v0.8.0

func (*PluginArchiveEntry) ProtoMessage()

func (*PluginArchiveEntry) ProtoReflect added in v0.8.0

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

func (*PluginArchiveEntry) Reset added in v0.8.0

func (x *PluginArchiveEntry) Reset()

func (*PluginArchiveEntry) String added in v0.8.0

func (x *PluginArchiveEntry) String() string

func (*PluginArchiveEntry) Validate added in v0.8.0

func (a *PluginArchiveEntry) Validate() error

type PluginManifest added in v0.8.0

type PluginManifest struct {
	Items []*PluginManifestEntry `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginManifest) Descriptor deprecated added in v0.8.0

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

Deprecated: Use PluginManifest.ProtoReflect.Descriptor instead.

func (*PluginManifest) Digest added in v0.8.0

func (m *PluginManifest) Digest() string

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

func (*PluginManifest) DigestSet added in v0.8.0

func (m *PluginManifest) DigestSet() map[string]struct{}

func (*PluginManifest) GetItems added in v0.8.0

func (x *PluginManifest) GetItems() []*PluginManifestEntry

func (*PluginManifest) PluginDigests added in v0.8.0

func (m *PluginManifest) PluginDigests() map[string]string

func (*PluginManifest) ProtoMessage added in v0.8.0

func (*PluginManifest) ProtoMessage()

func (*PluginManifest) ProtoReflect added in v0.8.0

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

func (*PluginManifest) Reset added in v0.8.0

func (x *PluginManifest) Reset()

func (*PluginManifest) Sort added in v0.8.0

func (m *PluginManifest) Sort()

func (*PluginManifest) String added in v0.8.0

func (x *PluginManifest) String() string

func (*PluginManifest) Validate added in v0.8.0

func (m *PluginManifest) Validate() error

type PluginManifestEntry added in v0.8.0

type PluginManifestEntry struct {
	Module   string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
	Filename string `protobuf:"bytes,2,opt,name=filename,proto3" json:"filename,omitempty"`
	Digest   string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*PluginManifestEntry) Descriptor deprecated added in v0.8.0

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

Deprecated: Use PluginManifestEntry.ProtoReflect.Descriptor instead.

func (*PluginManifestEntry) DigestBytes added in v0.8.0

func (m *PluginManifestEntry) DigestBytes() []byte

func (*PluginManifestEntry) DigestHash added in v0.8.0

func (m *PluginManifestEntry) DigestHash() hash.Hash

func (*PluginManifestEntry) GetDigest added in v0.8.0

func (x *PluginManifestEntry) GetDigest() string

func (*PluginManifestEntry) GetFilename added in v0.8.0

func (x *PluginManifestEntry) GetFilename() string

func (*PluginManifestEntry) GetId added in v0.8.0

func (m *PluginManifestEntry) GetId() string

func (*PluginManifestEntry) GetModule added in v0.8.0

func (x *PluginManifestEntry) GetModule() string

func (*PluginManifestEntry) ProtoMessage added in v0.8.0

func (*PluginManifestEntry) ProtoMessage()

func (*PluginManifestEntry) ProtoReflect added in v0.8.0

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

func (*PluginManifestEntry) Reset added in v0.8.0

func (x *PluginManifestEntry) Reset()

func (*PluginManifestEntry) String added in v0.8.0

func (x *PluginManifestEntry) String() string

func (*PluginManifestEntry) Validate added in v0.8.0

func (m *PluginManifestEntry) Validate() error

type PluginSyncClient added in v0.8.0

type PluginSyncClient interface {
	SyncPluginManifest(ctx context.Context, in *PluginManifest, opts ...grpc.CallOption) (*SyncResults, error)
	GetPluginManifest(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PluginManifest, error)
}

PluginSyncClient is the client API for PluginSync 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 NewPluginSyncClient added in v0.8.0

func NewPluginSyncClient(cc grpc.ClientConnInterface) PluginSyncClient

type PluginSyncServer added in v0.8.0

type PluginSyncServer interface {
	SyncPluginManifest(context.Context, *PluginManifest) (*SyncResults, error)
	GetPluginManifest(context.Context, *emptypb.Empty) (*PluginManifest, error)
	// contains filtered or unexported methods
}

PluginSyncServer is the server API for PluginSync service. All implementations must embed UnimplementedPluginSyncServer for forward compatibility

type SyncResults added in v0.8.0

type SyncResults struct {
	DesiredState    *PluginManifest `protobuf:"bytes,1,opt,name=desiredState,proto3" json:"desiredState,omitempty"`
	RequiredPatches *PatchList      `protobuf:"bytes,2,opt,name=requiredPatches,proto3" json:"requiredPatches,omitempty"`
	// contains filtered or unexported fields
}

func (*SyncResults) Descriptor deprecated added in v0.8.0

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

Deprecated: Use SyncResults.ProtoReflect.Descriptor instead.

func (*SyncResults) GetDesiredState added in v0.8.0

func (x *SyncResults) GetDesiredState() *PluginManifest

func (*SyncResults) GetRequiredPatches added in v0.8.0

func (x *SyncResults) GetRequiredPatches() *PatchList

func (*SyncResults) ProtoMessage added in v0.8.0

func (*SyncResults) ProtoMessage()

func (*SyncResults) ProtoReflect added in v0.8.0

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

func (*SyncResults) Reset added in v0.8.0

func (x *SyncResults) Reset()

func (*SyncResults) String added in v0.8.0

func (x *SyncResults) String() string

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 UnimplementedPluginSyncServer added in v0.8.0

type UnimplementedPluginSyncServer struct {
}

UnimplementedPluginSyncServer must be embedded to have forward compatible implementations.

func (UnimplementedPluginSyncServer) GetPluginManifest added in v0.8.0

func (UnimplementedPluginSyncServer) SyncPluginManifest added in v0.8.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 UnsafePluginSyncServer added in v0.8.0

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

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

Jump to

Keyboard shortcuts

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