Documentation ¶
Index ¶
- type Client
- func (c *Client) AddCompletedLayers(compressedLayerDigest string)
- func (c *Client) Close()
- func (c *Client) FindBaseImage(base, ref string) (img containerd.Image, err error)
- func (c *Client) GetFilesystemPath(cd string) string
- func (c *Client) GetFilesystemRoot() string
- func (c *Client) GetMountingPoint(ssId string) string
- func (c *Client) InitCLIServer() (err error)
- func (c *Client) InitSnapshotter() (err error)
- func (c *Client) LoadImage(manifest digest.Digest) (manager *Manager, err error)
- func (c *Client) Mount(md, ld, ssId string, sn *snapshots.Info) (mnt string, err error)
- func (c *Client) PullImage(base containerd.Image, ref, platform, proxyCfg string, ready *chan bool) (img containerd.Image, err error)
- func (c *Client) StartCLIServer()
- func (c *Client) StartSnapshotter()
- func (c *Client) Unmount(cd, sn string) error
- func (c *Client) UploadTraces(proxyCfg string, tc *fs.TraceCollection) error
- type Configuration
- type Manager
- func (m *Manager) CreateSnapshots(c *Client) (err error)
- func (m *Manager) Extract(r *io.ReadCloser) error
- func (m *Manager) GetPathByLayer(stack int64) string
- func (m *Manager) Init(cfg *Configuration, ready bool, manifest *v1.Manifest, imageConfig *v1.Image, ...)
- func (m *Manager) LogTrace(stack int64, filename string, access, complete time.Time)
- func (m *Manager) LookUpFile(stack int64, filename string) fs.ReceivedFile
- func (m *Manager) NewStarlightFS(mount string, stack int64, options *fusefs.Options, debug bool) (f *fs.Instance, err error)
- func (m *Manager) PrepareDirectories(c *Client) error
- func (m *Manager) SetOptimizerOff() (err error)
- func (m *Manager) SetOptimizerOn(optimizeGroup string) (err error)
- func (m *Manager) String() string
- func (m *Manager) Teardown()
- type ProxyConfig
- type StarlightDaemonAPIServer
- func (s *StarlightDaemonAPIServer) AddProxyProfile(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
- func (s *StarlightDaemonAPIServer) PullImage(ctx context.Context, ref *pb.ImageReference) (*pb.ImagePullResponse, error)
- func (s *StarlightDaemonAPIServer) ReportTraces(ctx context.Context, req *pb.ReportTracesRequest) (*pb.ReportTracesResponse, error)
- func (s *StarlightDaemonAPIServer) SetOptimizer(ctx context.Context, req *pb.OptimizeRequest) (*pb.OptimizeResponse, error)
- func (s *StarlightDaemonAPIServer) Version(ctx context.Context, req *pb.Request) (*pb.Version, error)
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) AddCompletedLayers ¶
func (*Client) FindBaseImage ¶
func (c *Client) FindBaseImage(base, ref string) (img containerd.Image, err error)
FindBaseImage find the closest available image for the requested image, if user appointed an image, then this function will be used for looking up the appointed image
func (*Client) GetFilesystemPath ¶
func (*Client) GetFilesystemRoot ¶
func (*Client) GetMountingPoint ¶
func (*Client) InitCLIServer ¶
func (*Client) InitSnapshotter ¶
InitSnapshotter initializes the snapshotter service
func (*Client) Mount ¶
Mount returns the mountpoint for the given snapshot - md: manifest digest - ld: uncompressed layer digest - ssId: snapshot id
func (*Client) PullImage ¶
func (c *Client) PullImage(base containerd.Image, ref, platform, proxyCfg string, ready *chan bool) (img containerd.Image, err error)
func (*Client) StartCLIServer ¶
func (c *Client) StartCLIServer()
func (*Client) StartSnapshotter ¶
func (c *Client) StartSnapshotter()
StartSnapshotter starts the snapshotter service, should be run in a goroutine
func (*Client) UploadTraces ¶
func (c *Client) UploadTraces(proxyCfg string, tc *fs.TraceCollection) error
type Configuration ¶
type Configuration struct { LogLevel string `json:"log_level"` ClientId string `json:"id"` // path to database Metadata string `json:"metadata"` // socket address Socket string `json:"socket"` DaemonType string `json:"daemon_type"` Daemon string `json:"daemon"` Containerd string `json:"containerd"` Namespace string `json:"default_namespace"` TracesDir string `json:"traces_dir"` // registry + proxy DefaultProxy string `json:"default_proxy"` FileSystemRoot string `json:"fs_root"` Proxies map[string]*ProxyConfig `json:"configs"` }
func LoadConfig ¶
func LoadConfig(cfgPath string) (c *Configuration, p string, n bool, error error)
func NewConfig ¶
func NewConfig() *Configuration
func (*Configuration) SaveConfig ¶
func (c *Configuration) SaveConfig() error
type Manager ¶
type Manager struct { receive.DeltaBundle // contains filtered or unexported fields }
Manager should be unmarshalled from a json file and then Populate() should be called to populate other fields
func (*Manager) CreateSnapshots ¶
func (*Manager) GetPathByLayer ¶
func (*Manager) Init ¶
func (m *Manager) Init(cfg *Configuration, ready bool, manifest *v1.Manifest, imageConfig *v1.Image, manifestDigest digest.Digest)
Init populates the manager with the necessary information and data structures. Use json.Unmarshal to unmarshal the json file from data storage into a Manager struct. - ready: if set to false, we will then use Extract() to get the content of the file - cfg: configuration of the client - image, manifest, imageConfig: information about the image (maybe we don't need this)
func (*Manager) LookUpFile ¶
func (m *Manager) LookUpFile(stack int64, filename string) fs.ReceivedFile
func (*Manager) NewStarlightFS ¶
func (m *Manager) NewStarlightFS(mount string, stack int64, options *fusefs.Options, debug bool) (f *fs.Instance, err error)
NewStarlightFS creates FUSE server and mount to provided mount directory
func (*Manager) PrepareDirectories ¶
func (*Manager) SetOptimizerOff ¶
func (*Manager) SetOptimizerOn ¶
type ProxyConfig ¶
type ProxyConfig struct { Protocol string `json:"protocol"` Address string `json:"address"` // Auth Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` }
func ParseProxyStrings ¶
func ParseProxyStrings(v string) (name string, c *ProxyConfig, err error)
type StarlightDaemonAPIServer ¶
type StarlightDaemonAPIServer struct { pb.UnimplementedDaemonServer // contains filtered or unexported fields }
func (*StarlightDaemonAPIServer) AddProxyProfile ¶
func (s *StarlightDaemonAPIServer) AddProxyProfile(ctx context.Context, req *pb.AuthRequest) (*pb.AuthResponse, error)
func (*StarlightDaemonAPIServer) PullImage ¶
func (s *StarlightDaemonAPIServer) PullImage(ctx context.Context, ref *pb.ImageReference) (*pb.ImagePullResponse, error)
func (*StarlightDaemonAPIServer) ReportTraces ¶
func (s *StarlightDaemonAPIServer) ReportTraces(ctx context.Context, req *pb.ReportTracesRequest) (*pb.ReportTracesResponse, error)
func (*StarlightDaemonAPIServer) SetOptimizer ¶
func (s *StarlightDaemonAPIServer) SetOptimizer(ctx context.Context, req *pb.OptimizeRequest) (*pb.OptimizeResponse, error)