resources

package
v0.7.11 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServer

type APIServer struct {
	entropyv1beta1.UnimplementedResourceServiceServer
	// contains filtered or unexported fields
}

func NewAPIServer

func NewAPIServer(resourceService ResourceService) *APIServer

func (APIServer) ApplyAction

func (APIServer) GetLog

func (APIServer) GetResource

func (APIServer) ListResources

type LogWrapper

type LogWrapper struct {
	entropyv1beta1.ResourceServiceServer

	Logger *zap.Logger
}

func (*LogWrapper) ApplyAction

func (*LogWrapper) GetLog

func (*LogWrapper) GetResource

type ResourceService

type ResourceService interface {
	GetResource(ctx context.Context, urn string) (*resource.Resource, error)
	ListResources(ctx context.Context, filter resource.Filter) ([]resource.Resource, error)
	CreateResource(ctx context.Context, res resource.Resource) (*resource.Resource, error)
	UpdateResource(ctx context.Context, urn string, req resource.UpdateRequest) (*resource.Resource, error)
	DeleteResource(ctx context.Context, urn string) error

	ApplyAction(ctx context.Context, urn string, action module.ActionRequest) (*resource.Resource, error)
	GetLog(ctx context.Context, urn string, filter map[string]string) (<-chan module.LogChunk, error)

	GetRevisions(ctx context.Context, selector resource.RevisionsSelector) ([]resource.Revision, error)
}

Jump to

Keyboard shortcuts

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