remote

package
v0.41.1 Latest Latest
Warning

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

Go to latest
Published: May 6, 2022 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

A Processor and ReposItory for COnfiguration Templates

Index

Constants

View Source
const CALL_TIMEOUT = 10 * time.Second

Variables

View Source
var (
	E_OK                                = status.New(codes.OK, "")
	E_CONFIGURATION_BACKEND_UNAVAILABLE = status.Errorf(codes.Internal, "configuration backend unavailable")
	E_BAD_INPUT                         = status.Errorf(codes.InvalidArgument, "bad request received")
)

Functions

func NewServer

func NewServer(service configuration.Service) *grpc.Server

func NewService

func NewService(configUri string) (svc configuration.Service, err error)

Types

type RemoteService

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

func (*RemoteService) GetAndProcessComponentConfiguration

func (c *RemoteService) GetAndProcessComponentConfiguration(query *componentcfg.Query, varStack map[string]string) (payload string, err error)

func (*RemoteService) GetCRUCardsForHost added in v0.22.0

func (c *RemoteService) GetCRUCardsForHost(hostname string) (cards string, err error)

func (*RemoteService) GetComponentConfiguration

func (c *RemoteService) GetComponentConfiguration(query *componentcfg.Query) (payload string, err error)

func (*RemoteService) GetComponentConfigurationWithLastIndex added in v0.29.2

func (c *RemoteService) GetComponentConfigurationWithLastIndex(query *componentcfg.Query) (payload string, lastIndex uint64, err error)

func (*RemoteService) GetDefaults

func (c *RemoteService) GetDefaults() map[string]string

func (*RemoteService) GetDetectorForHost added in v0.22.0

func (c *RemoteService) GetDetectorForHost(hostname string) (payload string, err error)

func (*RemoteService) GetDetectorsForHosts added in v0.26.3

func (c *RemoteService) GetDetectorsForHosts(hosts []string) (payload []string, err error)

func (*RemoteService) GetEndpointsForCRUCard added in v0.22.0

func (c *RemoteService) GetEndpointsForCRUCard(hostname, cardSerial string) (cards string, err error)

func (*RemoteService) GetHostInventory added in v0.22.80

func (c *RemoteService) GetHostInventory(detector string) (hosts []string, err error)

func (*RemoteService) GetRuntimeEntry

func (c *RemoteService) GetRuntimeEntry(component string, key string) (payload string, err error)

func (*RemoteService) GetVars

func (c *RemoteService) GetVars() map[string]string

func (*RemoteService) ImportComponentConfiguration

func (c *RemoteService) ImportComponentConfiguration(query *componentcfg.Query, payload string, newComponent bool, useVersioning bool) (existingComponentUpdated bool, existingEntryUpdated bool, newTimestamp int64, err error)

func (*RemoteService) ListComponentEntries

func (c *RemoteService) ListComponentEntries(query *componentcfg.EntriesQuery, showLatestTimestamp bool) (entries []string, err error)

func (*RemoteService) ListComponentEntryHistory

func (c *RemoteService) ListComponentEntryHistory(query *componentcfg.Query) (entries []string, err error)

func (*RemoteService) ListComponents

func (c *RemoteService) ListComponents() (components []string, err error)

func (*RemoteService) ListDetectors added in v0.26.3

func (c *RemoteService) ListDetectors(getAll bool) (detectors []string, err error)

func (*RemoteService) ListRuntimeEntries added in v0.25.80

func (c *RemoteService) ListRuntimeEntries(component string) (payload []string, err error)

func (*RemoteService) NewRunNumber

func (c *RemoteService) NewRunNumber() (runNumber uint32, err error)

func (*RemoteService) RawGetRecursive

func (c *RemoteService) RawGetRecursive(path string) (payload string, err error)

func (*RemoteService) SetRuntimeEntry

func (c *RemoteService) SetRuntimeEntry(component string, key string, value string) (err error)

type RpcServer

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

func (*RpcServer) GetCRUCardsForHost added in v0.22.0

func (m *RpcServer) GetCRUCardsForHost(_ context.Context, request *apricotpb.HostRequest) (*apricotpb.CRUCardsResponse, error)

func (*RpcServer) GetComponentConfiguration

func (m *RpcServer) GetComponentConfiguration(_ context.Context, request *apricotpb.ComponentRequest) (*apricotpb.ComponentResponse, error)

func (*RpcServer) GetComponentConfigurationWithLastIndex added in v0.29.2

func (m *RpcServer) GetComponentConfigurationWithLastIndex(_ context.Context, request *apricotpb.ComponentRequest) (*apricotpb.ComponentResponseWithLastIndex, error)

func (*RpcServer) GetDefaults

func (m *RpcServer) GetDefaults(_ context.Context, _ *apricotpb.Empty) (*apricotpb.StringMap, error)

func (*RpcServer) GetDetectorForHost added in v0.22.0

func (m *RpcServer) GetDetectorForHost(_ context.Context, request *apricotpb.HostRequest) (*apricotpb.DetectorResponse, error)

func (*RpcServer) GetDetectorsForHosts added in v0.26.3

func (m *RpcServer) GetDetectorsForHosts(_ context.Context, request *apricotpb.HostsRequest) (*apricotpb.DetectorsResponse, error)

func (*RpcServer) GetEndpointsForCRUCard added in v0.22.0

func (m *RpcServer) GetEndpointsForCRUCard(_ context.Context, request *apricotpb.CardRequest) (*apricotpb.CRUCardEndpointResponse, error)

func (*RpcServer) GetHostInventory added in v0.22.80

func (m *RpcServer) GetHostInventory(_ context.Context, request *apricotpb.HostGetRequest) (*apricotpb.HostEntriesResponse, error)

func (*RpcServer) GetRuntimeEntry

func (*RpcServer) GetVars

func (*RpcServer) ListComponentEntryHistory

func (m *RpcServer) ListComponentEntryHistory(_ context.Context, query *apricotpb.ComponentQuery) (*apricotpb.ComponentEntriesResponse, error)

func (*RpcServer) ListComponents

func (*RpcServer) ListDetectors added in v0.26.3

func (*RpcServer) ListRuntimeEntries added in v0.25.80

func (*RpcServer) NewRunNumber

func (*RpcServer) RawGetRecursive

func (*RpcServer) SetRuntimeEntry

func (m *RpcServer) SetRuntimeEntry(_ context.Context, request *apricotpb.SetRuntimeEntryRequest) (*apricotpb.Empty, error)

Jump to

Keyboard shortcuts

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