crudstore

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package crudstore supports reading data out of a legacy porter storage plugin

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func (*Client) List

func (g *Client) List(itemType string, group string) ([]string, error)

func (*Client) Read

func (g *Client) Read(itemType string, name string) ([]byte, error)

type Plugin

type Plugin struct {
	Impl Store
}

Plugin is a generic type of plugin for working with any implementation of a crud store.

func (Plugin) Client

func (Plugin) Client(b *plugin.MuxBroker, c *rpc.Client) (interface{}, error)

func (*Plugin) Server

func (p *Plugin) Server(*plugin.MuxBroker) (interface{}, error)

type Server

type Server struct {
	Impl Store
}

func (*Server) List

func (s *Server) List(args map[string]interface{}, resp *[]string) error

func (*Server) Read

func (s *Server) Read(args map[string]interface{}, resp *[]byte) error

type Store

type Store interface {
	// List the names of the items of the optional type and group.
	List(itemType string, group string) ([]string, error)

	// Read the data for a named item of the optional type.
	Read(itemType string, name string) ([]byte, error)
}

Store is an interface for interacting with legacy crudstore plugins to migrate porter's data

Jump to

Keyboard shortcuts

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