control

package
v0.24.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DeployerPath = "github.com/ServiceWeaver/weaver/deployerControl"

DeployerPath is the path used for the deployer control component. It points to an internal type in a different package.

View Source
const WeaveletPath = "github.com/ServiceWeaver/weaver/weaveletControl"

WeaveletPath is the path used for the weavelet control component. It points to an internal type in a different package.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeployerControl

type DeployerControl interface {
	// LogBatch logs the supplied batch of log entries.
	LogBatch(context.Context, *protos.LogEntryBatch) error

	// HandleTraceSpans saves the supplied trace spans.
	HandleTraceSpans(context.Context, *protos.TraceSpans) error

	// ActivateComponent ensures that the provided component is running
	// somewhere. A call to ActivateComponent also implicitly signals that a
	// weavelet is interested in receiving routing info for the component.
	ActivateComponent(context.Context, *protos.ActivateComponentRequest) (*protos.ActivateComponentReply, error)

	// GetListenerAddress returns the address the weavelet should listen on for
	// a particular listener.
	GetListenerAddress(context.Context, *protos.GetListenerAddressRequest) (*protos.GetListenerAddressReply, error)

	// ExportListener exports the provided listener. Exporting a listener
	// typically, but not always, involves running a proxy that forwards
	// traffic to the provided address.
	ExportListener(context.Context, *protos.ExportListenerRequest) (*protos.ExportListenerReply, error)

	// GetSelfCertificate returns the certificate and the private key the
	// weavelet should use for network connection establishment. The weavelet
	// will issue this request each time it establishes a connection with
	// another weavelet.
	// NOTE: This method is only called if mTLS was enabled for the weavelet,
	// by passing it a WeaveletArgs with mtls=true.
	GetSelfCertificate(context.Context, *protos.GetSelfCertificateRequest) (*protos.GetSelfCertificateReply, error)

	// VerifyClientCertificate verifies the certificate chain presented by
	// a network client attempting to connect to the weavelet. It returns an
	// error if the network connection should not be established with the
	// client. Otherwise, it returns the list of weavelet components that the
	// client is authorized to invoke methods on.
	//
	// NOTE: This method is only called if mTLS was enabled for the weavelet,
	// by passing it a WeaveletArgs with mtls=true.
	VerifyClientCertificate(context.Context, *protos.VerifyClientCertificateRequest) (*protos.VerifyClientCertificateReply, error)

	// VerifyServerCertificate verifies the certificate chain presented by
	// the server the weavelet is attempting to connect to. It returns an
	// error iff the server identity doesn't match the identity of the specified
	// component.
	//
	// NOTE: This method is only called if mTLS was enabled for the weavelet,
	// by passing it a WeaveletArgs with mtls=true.
	VerifyServerCertificate(context.Context, *protos.VerifyServerCertificateRequest) (*protos.VerifyServerCertificateReply, error)
}

DeployerControl is the interface for the weaver.deployerControl component. It is present in its own package so other packages do not need to copy the interface definition.

Arguments and results are protobufs to allow deployers to evolve independently of application binaries.

type WeaveletControl

type WeaveletControl interface {
	// InitWeavelet initializes the weavelet.
	InitWeavelet(context.Context, *protos.InitWeaveletRequest) (*protos.InitWeaveletReply, error)

	// UpdateComponents updates the weavelet with the latest set of components it
	// should be running.
	UpdateComponents(context.Context, *protos.UpdateComponentsRequest) (*protos.UpdateComponentsReply, error)

	// UpdateRoutingInfo updates the weavelet with a component's most recent routing info.
	UpdateRoutingInfo(context.Context, *protos.UpdateRoutingInfoRequest) (*protos.UpdateRoutingInfoReply, error)

	// GetHealth fetches weavelet health information.
	GetHealth(context.Context, *protos.GetHealthRequest) (*protos.GetHealthReply, error)

	// GetLoad fetches weavelet load information.
	GetLoad(context.Context, *protos.GetLoadRequest) (*protos.GetLoadReply, error)

	// GetMetrics fetches metrics from the weavelet.
	GetMetrics(context.Context, *protos.GetMetricsRequest) (*protos.GetMetricsReply, error)

	// GetProfile gets a profile from the weavelet.
	GetProfile(context.Context, *protos.GetProfileRequest) (*protos.GetProfileReply, error)
}

WeaveletControl is the interface for the weaver.weaveletControl component. It is present in its own package so other packages do not need to copy the interface definition.

Arguments and results are protobufs to allow deployers to evolve independently of application binaries.

Jump to

Keyboard shortcuts

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