patch

package
v0.6.0-rc4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPatch

func ApplyPatch(outdatedBytes, patch []byte) ([]byte, error)

func GeneratePatch

func GeneratePatch(outdatedBytes, newestBytes []byte) ([]byte, error)

func GetFilesystemPlugins

func GetFilesystemPlugins(config v1beta1.PluginsSpec, lg *zap.SugaredLogger) (*v1.ManifestMetadataList, error)

func PatchWith

func PatchWith(
	ctx context.Context,
	config v1beta1.PluginsSpec,
	receivedManifests *v1.ManifestList,
	lg *zap.SugaredLogger,
	gatewaySyncClient v1.PluginManifestClient,
) (chan struct{}, error)

Types

type FilesystemPluginSyncServer

type FilesystemPluginSyncServer struct {
	v1.UnsafePluginManifestServer
	Logger *zap.SugaredLogger
	Config v1beta1.PluginsSpec
	// contains filtered or unexported fields
}

func (*FilesystemPluginSyncServer) GetPluginManifests

func (*FilesystemPluginSyncServer) SendManifestsOrKnownPatch

func (f *FilesystemPluginSyncServer) SendManifestsOrKnownPatch(
	ctx context.Context,
	theirManifestMetadata *v1.ManifestMetadataList,
) (*v1.ManifestList, error)

func (*FilesystemPluginSyncServer) StreamServerInterceptor

func (f *FilesystemPluginSyncServer) StreamServerInterceptor() grpc.StreamServerInterceptor

func (*FilesystemPluginSyncServer) UploadPatch

func (f *FilesystemPluginSyncServer) UploadPatch(ctx context.Context, spec *v1.PatchSpec) (*emptypb.Empty, error)

type InMemoryCache

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

func (*InMemoryCache) Get

func (c *InMemoryCache) Get(pluginName, oldRevision, newRevision string) ([]byte, error)

func (*InMemoryCache) Key

func (c *InMemoryCache) Key(pluginName, oldRevision, newRevision string) string

func (*InMemoryCache) Put

func (c *InMemoryCache) Put(pluginName, oldRevision, newRevision string, patch []byte) error

type PatchCache

type PatchCache interface {
	Get(pluginName, oldRevision, newRevision string) ([]byte, error)
	Put(pluginName, oldRevision, newRevision string, patch []byte) error
	Key(pluginName, oldRevision, newRevision string) string
}

func NewInMemoryCache

func NewInMemoryCache() PatchCache

type ZstdCompressor

type ZstdCompressor struct{}

func (ZstdCompressor) Compress

func (c ZstdCompressor) Compress(w io.Writer) (io.WriteCloser, error)

func (ZstdCompressor) Decompress

func (c ZstdCompressor) Decompress(r io.Reader) (io.Reader, error)

func (ZstdCompressor) Name

func (c ZstdCompressor) Name() string

Jump to

Keyboard shortcuts

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