Documentation ¶
Index ¶
- func ApplyIOStreamPatch(oldBin io.Reader, patchf io.Reader, newBin io.Writer) error
- func ApplyPatch(outdatedBytes, patch []byte) ([]byte, error)
- func GenerateIOStreamPatch(oldBin io.Reader, newBin io.Reader, patchf io.Writer) error
- func GeneratePatch(outdatedBytes, newestBytes []byte) ([]byte, error)
- func GetFilesystemPlugins(config v1beta1.PluginsSpec, lg *zap.SugaredLogger) (*controlv1.ManifestMetadataList, error)
- func PatchWith(ctx context.Context, config v1beta1.PluginsSpec, ...) (chan struct{}, error)
- type FilesystemPluginSyncServer
- func (f *FilesystemPluginSyncServer) GetPluginManifests(ctx context.Context, _ *emptypb.Empty) (*controlv1.ManifestMetadataList, error)
- func (f *FilesystemPluginSyncServer) SendManifestsOrKnownPatch(ctx context.Context, theirManifestMetadata *controlv1.ManifestMetadataList) (*controlv1.ManifestList, error)
- func (f *FilesystemPluginSyncServer) StreamServerInterceptor() grpc.StreamServerInterceptor
- func (f *FilesystemPluginSyncServer) UploadPatch(ctx context.Context, spec *controlv1.PatchSpec) (*emptypb.Empty, error)
- type InMemoryCache
- type PatchCache
- type ZstdCompressor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyIOStreamPatch ¶ added in v0.6.1
writes in place the result to the newBin io.Writer
func ApplyPatch ¶
func GenerateIOStreamPatch ¶ added in v0.6.1
writes in place the result to the patchf io.Writer
func GeneratePatch ¶
func GetFilesystemPlugins ¶
func GetFilesystemPlugins(config v1beta1.PluginsSpec, lg *zap.SugaredLogger) (*controlv1.ManifestMetadataList, error)
func PatchWith ¶
func PatchWith( ctx context.Context, config v1beta1.PluginsSpec, receivedManifests *controlv1.ManifestList, lg *zap.SugaredLogger, gatewaySyncClient controlv1.PluginManifestClient, ) (chan struct{}, error)
digests must match after the patchops are processed, not after the patch is calculated
Types ¶
type FilesystemPluginSyncServer ¶
type FilesystemPluginSyncServer struct { controlv1.UnsafePluginManifestServer Logger *zap.SugaredLogger Config v1beta1.PluginsSpec // contains filtered or unexported fields }
func NewFilesystemPluginSyncServer ¶
func NewFilesystemPluginSyncServer(cfg v1beta1.PluginsSpec, lg *zap.SugaredLogger) *FilesystemPluginSyncServer
func (*FilesystemPluginSyncServer) GetPluginManifests ¶
func (f *FilesystemPluginSyncServer) GetPluginManifests(ctx context.Context, _ *emptypb.Empty) (*controlv1.ManifestMetadataList, error)
func (*FilesystemPluginSyncServer) SendManifestsOrKnownPatch ¶
func (f *FilesystemPluginSyncServer) SendManifestsOrKnownPatch( ctx context.Context, theirManifestMetadata *controlv1.ManifestMetadataList, ) (*controlv1.ManifestList, error)
func (*FilesystemPluginSyncServer) StreamServerInterceptor ¶
func (f *FilesystemPluginSyncServer) StreamServerInterceptor() grpc.StreamServerInterceptor
func (*FilesystemPluginSyncServer) UploadPatch ¶
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
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 (ZstdCompressor) Name ¶
func (c ZstdCompressor) Name() string
Click to show internal directories.
Click to hide internal directories.