habitat

package
v0.0.0-...-be2ef80 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

README

Habitat Protobufs

Files in this directory are synced in from the habitat project. In the synchronization process we make the modifications necessary to compile the protos to golang code we can use in Automate. Aside from that, the copy here should be verbatim.

The files here should never be edited directly, except under exceptional circumstances. To make changes, modify the script that synchronizes from the upstream.

How to Update:

From your host system or the hab studio, cd to this directory, then run ./update-event-proto.sh. In the studio you may need to install curl first, that can be done with install_if_missing core/curl curl. After that you can compile the protos as normal, e.g., with compile_all_protobuf_components.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	UpdateStrategy_name = map[int32]string{
		0: "AtOnce",
		1: "Rolling",
	}
	UpdateStrategy_value = map[string]int32{
		"AtOnce":  0,
		"Rolling": 1,
	}
)

Enum value maps for UpdateStrategy.

View Source
var (
	HealthCheckResult_name = map[int32]string{
		0: "Ok",
		1: "Warning",
		2: "Critical",
		3: "Unknown",
	}
	HealthCheckResult_value = map[string]int32{
		"Ok":       0,
		"Warning":  1,
		"Critical": 2,
		"Unknown":  3,
	}
)

Enum value maps for HealthCheckResult.

View Source
var File_external_habitat_event_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type EventMetadata

type EventMetadata struct {

	// The unique ID of this Supervisor.
	SupervisorId string `protobuf:"bytes,1,opt,name=supervisor_id,json=supervisorId,proto3" json:"supervisor_id,omitempty"`
	// The IP address on which the Supervisor is listening for gossip.
	IpAddress   string                 `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress,proto3" json:"ip_address,omitempty"`
	OccurredAt  *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=occurred_at,json=occurredAt,proto3" json:"occurred_at,omitempty"`
	Application string                 `protobuf:"bytes,4,opt,name=application,proto3" json:"application,omitempty"`
	Environment string                 `protobuf:"bytes,5,opt,name=environment,proto3" json:"environment,omitempty"`
	Meta        map[string]string      `` /* 149-byte string literal not displayed */
	Fqdn        string                 `protobuf:"bytes,7,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
	Site        string                 `protobuf:"bytes,8,opt,name=site,proto3" json:"site,omitempty"`
	// contains filtered or unexported fields
}

func (*EventMetadata) Descriptor deprecated

func (*EventMetadata) Descriptor() ([]byte, []int)

Deprecated: Use EventMetadata.ProtoReflect.Descriptor instead.

func (*EventMetadata) GetApplication

func (x *EventMetadata) GetApplication() string

func (*EventMetadata) GetEnvironment

func (x *EventMetadata) GetEnvironment() string

func (*EventMetadata) GetFqdn

func (x *EventMetadata) GetFqdn() string

func (*EventMetadata) GetIpAddress

func (x *EventMetadata) GetIpAddress() string

func (*EventMetadata) GetMeta

func (x *EventMetadata) GetMeta() map[string]string

func (*EventMetadata) GetOccurredAt

func (x *EventMetadata) GetOccurredAt() *timestamppb.Timestamp

func (*EventMetadata) GetSite

func (x *EventMetadata) GetSite() string

func (*EventMetadata) GetSupervisorId

func (x *EventMetadata) GetSupervisorId() string

func (*EventMetadata) ProtoMessage

func (*EventMetadata) ProtoMessage()

func (*EventMetadata) ProtoReflect

func (x *EventMetadata) ProtoReflect() protoreflect.Message

func (*EventMetadata) Reset

func (x *EventMetadata) Reset()

func (*EventMetadata) String

func (x *EventMetadata) String() string

type HealthCheckEvent

type HealthCheckEvent struct {
	EventMetadata   *EventMetadata    `protobuf:"bytes,1,opt,name=event_metadata,json=eventMetadata,proto3" json:"event_metadata,omitempty"`
	ServiceMetadata *ServiceMetadata  `protobuf:"bytes,2,opt,name=service_metadata,json=serviceMetadata,proto3" json:"service_metadata,omitempty"`
	Result          HealthCheckResult `protobuf:"varint,3,opt,name=result,proto3,enum=chef.habitat.supervisor.event.HealthCheckResult" json:"result,omitempty"`
	// If the service has a health check hook script, how long it took
	// to execute.
	Execution *durationpb.Duration `protobuf:"bytes,4,opt,name=execution,proto3" json:"execution,omitempty"`
	// The health check hook exit status
	ExitStatus *wrapperspb.Int32Value `protobuf:"bytes,5,opt,name=exit_status,json=exitStatus,proto3" json:"exit_status,omitempty"`
	// The health check hook stdout output
	Stdout *wrapperspb.StringValue `protobuf:"bytes,6,opt,name=stdout,proto3" json:"stdout,omitempty"`
	// The health check hook stderr output
	Stderr *wrapperspb.StringValue `protobuf:"bytes,7,opt,name=stderr,proto3" json:"stderr,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthCheckEvent) Descriptor deprecated

func (*HealthCheckEvent) Descriptor() ([]byte, []int)

Deprecated: Use HealthCheckEvent.ProtoReflect.Descriptor instead.

func (*HealthCheckEvent) GetEventMetadata

func (x *HealthCheckEvent) GetEventMetadata() *EventMetadata

func (*HealthCheckEvent) GetExecution

func (x *HealthCheckEvent) GetExecution() *durationpb.Duration

func (*HealthCheckEvent) GetExitStatus

func (x *HealthCheckEvent) GetExitStatus() *wrapperspb.Int32Value

func (*HealthCheckEvent) GetResult

func (x *HealthCheckEvent) GetResult() HealthCheckResult

func (*HealthCheckEvent) GetServiceMetadata

func (x *HealthCheckEvent) GetServiceMetadata() *ServiceMetadata

func (*HealthCheckEvent) GetStderr

func (x *HealthCheckEvent) GetStderr() *wrapperspb.StringValue

func (*HealthCheckEvent) GetStdout

func (x *HealthCheckEvent) GetStdout() *wrapperspb.StringValue

func (*HealthCheckEvent) ProtoMessage

func (*HealthCheckEvent) ProtoMessage()

func (*HealthCheckEvent) ProtoReflect

func (x *HealthCheckEvent) ProtoReflect() protoreflect.Message

func (*HealthCheckEvent) Reset

func (x *HealthCheckEvent) Reset()

func (*HealthCheckEvent) String

func (x *HealthCheckEvent) String() string

type HealthCheckResult

type HealthCheckResult int32
const (
	HealthCheckResult_Ok       HealthCheckResult = 0
	HealthCheckResult_Warning  HealthCheckResult = 1
	HealthCheckResult_Critical HealthCheckResult = 2
	HealthCheckResult_Unknown  HealthCheckResult = 3
)

func (HealthCheckResult) Descriptor

func (HealthCheckResult) Enum

func (HealthCheckResult) EnumDescriptor deprecated

func (HealthCheckResult) EnumDescriptor() ([]byte, []int)

Deprecated: Use HealthCheckResult.Descriptor instead.

func (HealthCheckResult) Number

func (HealthCheckResult) String

func (x HealthCheckResult) String() string

func (HealthCheckResult) Type

type ServiceMetadata

type ServiceMetadata struct {

	// The fully-qualified identifier of the package that is currently
	// running.
	PackageIdent string `protobuf:"bytes,1,opt,name=package_ident,json=packageIdent,proto3" json:"package_ident,omitempty"`
	// This is the identifier the service was loaded with (e.g., the
	// `core/redis` in `hab svc load core/redis`). While it _can_ be a
	// fully-qualified package identifier, it is more commonly a 2- or
	// 3-part identifier variant.
	SpecIdent    string        `protobuf:"bytes,2,opt,name=spec_ident,json=specIdent,proto3" json:"spec_ident,omitempty"`
	ServiceGroup string        `protobuf:"bytes,3,opt,name=service_group,json=serviceGroup,proto3" json:"service_group,omitempty"`
	UpdateConfig *UpdateConfig `protobuf:"bytes,4,opt,name=update_config,json=updateConfig,proto3" json:"update_config,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceMetadata) Descriptor deprecated

func (*ServiceMetadata) Descriptor() ([]byte, []int)

Deprecated: Use ServiceMetadata.ProtoReflect.Descriptor instead.

func (*ServiceMetadata) GetPackageIdent

func (x *ServiceMetadata) GetPackageIdent() string

func (*ServiceMetadata) GetServiceGroup

func (x *ServiceMetadata) GetServiceGroup() string

func (*ServiceMetadata) GetSpecIdent

func (x *ServiceMetadata) GetSpecIdent() string

func (*ServiceMetadata) GetUpdateConfig

func (x *ServiceMetadata) GetUpdateConfig() *UpdateConfig

func (*ServiceMetadata) ProtoMessage

func (*ServiceMetadata) ProtoMessage()

func (*ServiceMetadata) ProtoReflect

func (x *ServiceMetadata) ProtoReflect() protoreflect.Message

func (*ServiceMetadata) Reset

func (x *ServiceMetadata) Reset()

func (*ServiceMetadata) String

func (x *ServiceMetadata) String() string

type ServiceStartedEvent

type ServiceStartedEvent struct {
	EventMetadata   *EventMetadata   `protobuf:"bytes,1,opt,name=event_metadata,json=eventMetadata,proto3" json:"event_metadata,omitempty"`
	ServiceMetadata *ServiceMetadata `protobuf:"bytes,2,opt,name=service_metadata,json=serviceMetadata,proto3" json:"service_metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceStartedEvent) Descriptor deprecated

func (*ServiceStartedEvent) Descriptor() ([]byte, []int)

Deprecated: Use ServiceStartedEvent.ProtoReflect.Descriptor instead.

func (*ServiceStartedEvent) GetEventMetadata

func (x *ServiceStartedEvent) GetEventMetadata() *EventMetadata

func (*ServiceStartedEvent) GetServiceMetadata

func (x *ServiceStartedEvent) GetServiceMetadata() *ServiceMetadata

func (*ServiceStartedEvent) ProtoMessage

func (*ServiceStartedEvent) ProtoMessage()

func (*ServiceStartedEvent) ProtoReflect

func (x *ServiceStartedEvent) ProtoReflect() protoreflect.Message

func (*ServiceStartedEvent) Reset

func (x *ServiceStartedEvent) Reset()

func (*ServiceStartedEvent) String

func (x *ServiceStartedEvent) String() string

type ServiceStoppedEvent

type ServiceStoppedEvent struct {
	EventMetadata   *EventMetadata   `protobuf:"bytes,1,opt,name=event_metadata,json=eventMetadata,proto3" json:"event_metadata,omitempty"`
	ServiceMetadata *ServiceMetadata `protobuf:"bytes,2,opt,name=service_metadata,json=serviceMetadata,proto3" json:"service_metadata,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceStoppedEvent) Descriptor deprecated

func (*ServiceStoppedEvent) Descriptor() ([]byte, []int)

Deprecated: Use ServiceStoppedEvent.ProtoReflect.Descriptor instead.

func (*ServiceStoppedEvent) GetEventMetadata

func (x *ServiceStoppedEvent) GetEventMetadata() *EventMetadata

func (*ServiceStoppedEvent) GetServiceMetadata

func (x *ServiceStoppedEvent) GetServiceMetadata() *ServiceMetadata

func (*ServiceStoppedEvent) ProtoMessage

func (*ServiceStoppedEvent) ProtoMessage()

func (*ServiceStoppedEvent) ProtoReflect

func (x *ServiceStoppedEvent) ProtoReflect() protoreflect.Message

func (*ServiceStoppedEvent) Reset

func (x *ServiceStoppedEvent) Reset()

func (*ServiceStoppedEvent) String

func (x *ServiceStoppedEvent) String() string

type ServiceUpdateStartedEvent

type ServiceUpdateStartedEvent struct {
	EventMetadata   *EventMetadata   `protobuf:"bytes,1,opt,name=event_metadata,json=eventMetadata,proto3" json:"event_metadata,omitempty"`
	ServiceMetadata *ServiceMetadata `protobuf:"bytes,2,opt,name=service_metadata,json=serviceMetadata,proto3" json:"service_metadata,omitempty"`
	// Details of the service pkg to which
	// we're attempting to update.This is
	// implemented as a string for now,
	// but at some point we'll may want
	// to create a type for this set of
	// attributes (FullyQualifiedPackageIdent)
	UpdatePackageIdent string `protobuf:"bytes,3,opt,name=update_package_ident,json=updatePackageIdent,proto3" json:"update_package_ident,omitempty"`
	// contains filtered or unexported fields
}

func (*ServiceUpdateStartedEvent) Descriptor deprecated

func (*ServiceUpdateStartedEvent) Descriptor() ([]byte, []int)

Deprecated: Use ServiceUpdateStartedEvent.ProtoReflect.Descriptor instead.

func (*ServiceUpdateStartedEvent) GetEventMetadata

func (x *ServiceUpdateStartedEvent) GetEventMetadata() *EventMetadata

func (*ServiceUpdateStartedEvent) GetServiceMetadata

func (x *ServiceUpdateStartedEvent) GetServiceMetadata() *ServiceMetadata

func (*ServiceUpdateStartedEvent) GetUpdatePackageIdent

func (x *ServiceUpdateStartedEvent) GetUpdatePackageIdent() string

func (*ServiceUpdateStartedEvent) ProtoMessage

func (*ServiceUpdateStartedEvent) ProtoMessage()

func (*ServiceUpdateStartedEvent) ProtoReflect

func (*ServiceUpdateStartedEvent) Reset

func (x *ServiceUpdateStartedEvent) Reset()

func (*ServiceUpdateStartedEvent) String

func (x *ServiceUpdateStartedEvent) String() string

type UpdateConfig

type UpdateConfig struct {
	Strategy UpdateStrategy `protobuf:"varint,1,opt,name=strategy,proto3,enum=chef.habitat.supervisor.event.UpdateStrategy" json:"strategy,omitempty"`
	// The channel the Supervisor will monitor for updates to this
	// service.
	Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
	// contains filtered or unexported fields
}

Encapsulates an update strategy with the channel that is checked for updates. Both must be present for either to be meaningful.a

func (*UpdateConfig) Descriptor deprecated

func (*UpdateConfig) Descriptor() ([]byte, []int)

Deprecated: Use UpdateConfig.ProtoReflect.Descriptor instead.

func (*UpdateConfig) GetChannel

func (x *UpdateConfig) GetChannel() string

func (*UpdateConfig) GetStrategy

func (x *UpdateConfig) GetStrategy() UpdateStrategy

func (*UpdateConfig) ProtoMessage

func (*UpdateConfig) ProtoMessage()

func (*UpdateConfig) ProtoReflect

func (x *UpdateConfig) ProtoReflect() protoreflect.Message

func (*UpdateConfig) Reset

func (x *UpdateConfig) Reset()

func (*UpdateConfig) String

func (x *UpdateConfig) String() string

type UpdateStrategy

type UpdateStrategy int32

Note that there is no `None` value, as currently exists in the Rust code for the Supervisor. Here we are only going to deal with the actual update strategies (because `None` isn't really a strategy!)

const (
	// Service updates are applied immediately as they are available,
	// with no additional coordination.
	UpdateStrategy_AtOnce UpdateStrategy = 0
	// Updates are applied one-by-one throughout a service group to
	// prevent everything from updating all at once.
	UpdateStrategy_Rolling UpdateStrategy = 1
)

func (UpdateStrategy) Descriptor

func (UpdateStrategy) Enum

func (x UpdateStrategy) Enum() *UpdateStrategy

func (UpdateStrategy) EnumDescriptor deprecated

func (UpdateStrategy) EnumDescriptor() ([]byte, []int)

Deprecated: Use UpdateStrategy.Descriptor instead.

func (UpdateStrategy) Number

func (UpdateStrategy) String

func (x UpdateStrategy) String() string

func (UpdateStrategy) Type

Jump to

Keyboard shortcuts

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