servicecommunication

package
v0.0.0-...-cd88763 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package servicecommunication provides common types and functions for communicating between services.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAnyPrefix

func HasAnyPrefix(s string, prefixes []string) bool

HasAnyPrefix returns true if any of the prefixes is a prefix of the given string.

Types

type DataWarehouseActivationResult

type DataWarehouseActivationResult struct {
	Activated bool
}

DataWarehouseActivationResult holds the results of a data warehouse activation check.

type DiscoveryResult

type DiscoveryResult struct {
	Processes []ProcessWrapper
}

DiscoveryResult holds the results of a discovery operation.

type Message

type Message struct {
	Origin             MessageOrigin
	DiscoveryResult    DiscoveryResult
	DWActivationResult DataWarehouseActivationResult
}

Message is the message type used to communicate between services.

type MessageOrigin

type MessageOrigin int

MessageOrigin is the origin of the message.

const (
	// UnspecifiedMessageOrigin is the default message origin.
	UnspecifiedMessageOrigin MessageOrigin = iota
	// Discovery is the message origin for discovery.
	Discovery
	// DWActivation is the message origin for data warehouse activation.
	DWActivation
)

type ProcessWrapper

type ProcessWrapper interface {
	Username() (string, error)
	Pid() int32
	Name() (string, error)
	CmdlineSlice() ([]string, error)
	Environ() ([]string, error)
	String() string
}

ProcessWrapper is a wrapper around process.Process to support testing.

Directories

Path Synopsis
Package datawarehouseactivation performs data warehouse activation operations for all services.
Package datawarehouseactivation performs data warehouse activation operations for all services.
Package discovery performs common discovery operations for all services.
Package discovery performs common discovery operations for all services.

Jump to

Keyboard shortcuts

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