v1

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AgentBuildInfoKey = "agent-build-info"
)
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"
)
View Source
const (
	UpdateSync_SyncManifest_FullMethodName = "/control.UpdateSync/SyncManifest"
)

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 UpdateSync_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "control.UpdateSync",
	HandlerType: (*UpdateSyncServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SyncManifest",
			Handler:    _UpdateSync_SyncManifest_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/pkg/apis/control/v1/remote.proto",
}

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

Functions

func ManifestDigestKeyForType added in v0.11.0

func ManifestDigestKeyForType(t urn.UpdateType) string

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 RegisterUpdateSyncServer added in v0.11.0

func RegisterUpdateSyncServer(s grpc.ServiceRegistrar, srv UpdateSyncServer)

func UpdateStrategyKeyForType added in v0.11.0

func UpdateStrategyKeyForType(t urn.UpdateType) string

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) Summary added in v0.12.0

func (l *PatchList) Summary() 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 {
	Package   string  `protobuf:"bytes,1,opt,name=package,proto3" json:"package,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"`
	Path      string  `protobuf:"bytes,4,opt,name=path,proto3" json:"path,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) 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) GetPackage added in v0.11.0

func (x *PatchSpec) GetPackage() string

func (*PatchSpec) GetPath added in v0.11.0

func (x *PatchSpec) GetPath() 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 (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() *UpdateManifest

func (*PluginArchive) Validate added in v0.8.0

func (a *PluginArchive) Validate() error

type PluginArchiveEntry added in v0.8.0

type PluginArchiveEntry struct {
	Metadata *UpdateManifestEntry `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() *UpdateManifestEntry

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

type SyncResults struct {
	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) 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 UnimplementedUpdateSyncServer added in v0.11.0

type UnimplementedUpdateSyncServer struct {
}

UnimplementedUpdateSyncServer must be embedded to have forward compatible implementations.

func (UnimplementedUpdateSyncServer) SyncManifest added in v0.11.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 UnsafeUpdateSyncServer added in v0.11.0

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

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

type UpdateManifest added in v0.11.0

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

func (*UpdateManifest) Descriptor deprecated added in v0.11.0

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

Deprecated: Use UpdateManifest.ProtoReflect.Descriptor instead.

func (*UpdateManifest) Digest added in v0.11.0

func (m *UpdateManifest) Digest() string

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

func (*UpdateManifest) DigestMap added in v0.11.0

func (m *UpdateManifest) DigestMap() map[string]string

func (*UpdateManifest) DigestSet added in v0.11.0

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

func (*UpdateManifest) GetItems added in v0.11.0

func (x *UpdateManifest) GetItems() []*UpdateManifestEntry

func (*UpdateManifest) ProtoMessage added in v0.11.0

func (*UpdateManifest) ProtoMessage()

func (*UpdateManifest) ProtoReflect added in v0.11.0

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

func (*UpdateManifest) Reset added in v0.11.0

func (x *UpdateManifest) Reset()

func (*UpdateManifest) Sort added in v0.11.0

func (m *UpdateManifest) Sort()

func (*UpdateManifest) String added in v0.11.0

func (x *UpdateManifest) String() string

func (*UpdateManifest) Validate added in v0.11.0

func (m *UpdateManifest) Validate() error

type UpdateManifestEntry added in v0.11.0

type UpdateManifestEntry struct {
	Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"`
	Path    string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"`
	Digest  string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateManifestEntry) Descriptor deprecated added in v0.11.0

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

Deprecated: Use UpdateManifestEntry.ProtoReflect.Descriptor instead.

func (*UpdateManifestEntry) DigestBytes added in v0.11.0

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

func (*UpdateManifestEntry) DigestHash added in v0.11.0

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

func (*UpdateManifestEntry) GetDigest added in v0.11.0

func (x *UpdateManifestEntry) GetDigest() string

func (*UpdateManifestEntry) GetId added in v0.11.0

func (m *UpdateManifestEntry) GetId() string

func (*UpdateManifestEntry) GetPackage added in v0.11.0

func (x *UpdateManifestEntry) GetPackage() string

func (*UpdateManifestEntry) GetPath added in v0.11.0

func (x *UpdateManifestEntry) GetPath() string

func (*UpdateManifestEntry) ProtoMessage added in v0.11.0

func (*UpdateManifestEntry) ProtoMessage()

func (*UpdateManifestEntry) ProtoReflect added in v0.11.0

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

func (*UpdateManifestEntry) Reset added in v0.11.0

func (x *UpdateManifestEntry) Reset()

func (*UpdateManifestEntry) String added in v0.11.0

func (x *UpdateManifestEntry) String() string

func (*UpdateManifestEntry) Validate added in v0.11.0

func (m *UpdateManifestEntry) Validate() error

type UpdateSyncClient added in v0.11.0

type UpdateSyncClient interface {
	SyncManifest(ctx context.Context, in *UpdateManifest, opts ...grpc.CallOption) (*SyncResults, error)
}

UpdateSyncClient is the client API for UpdateSync 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 NewUpdateSyncClient added in v0.11.0

func NewUpdateSyncClient(cc grpc.ClientConnInterface) UpdateSyncClient

type UpdateSyncServer added in v0.11.0

type UpdateSyncServer interface {
	SyncManifest(context.Context, *UpdateManifest) (*SyncResults, error)
	// contains filtered or unexported methods
}

UpdateSyncServer is the server API for UpdateSync service. All implementations must embed UnimplementedUpdateSyncServer for forward compatibility

Jump to

Keyboard shortcuts

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