servicev1

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_runtime_service_v1_service_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Service

type Service struct {

	// name is the unique identifier for the service, used for service discovery and logging.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// servers is a list of server endpoints that this service will expose.
	// A service can listen on multiple protocols simultaneously, e.g., both gRPC and HTTP.
	Servers []*v1.Server `protobuf:"bytes,2,rep,name=servers,proto3" json:"servers,omitempty"`
	// clients is a list of client configurations for services that this service depends on.
	// This list will be converted into a map in the application's bootstrap logic,
	// using the 'name' field from each Client message as the key.
	Clients []*v1.Client `protobuf:"bytes,3,rep,name=clients,proto3" json:"clients,omitempty"`
	// middlewares is a list of middleware configurations to be applied to the service.
	Middlewares []*v11.MiddlewareConfig `protobuf:"bytes,4,rep,name=middlewares,proto3" json:"middlewares,omitempty"`
	// contains filtered or unexported fields
}

Service defines a complete microservice unit. It encapsulates the service's identity, its server endpoints, its client dependencies, and its middleware configurations.

func (*Service) Descriptor deprecated

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

Deprecated: Use Service.ProtoReflect.Descriptor instead.

func (*Service) GetClients

func (x *Service) GetClients() []*v1.Client

func (*Service) GetMiddlewares

func (x *Service) GetMiddlewares() []*v11.MiddlewareConfig

func (*Service) GetName

func (x *Service) GetName() string

func (*Service) GetServers

func (x *Service) GetServers() []*v1.Server

func (*Service) ProtoMessage

func (*Service) ProtoMessage()

func (*Service) ProtoReflect

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

func (*Service) Reset

func (x *Service) Reset()

func (*Service) String

func (x *Service) String() string

func (*Service) Validate

func (m *Service) Validate() error

Validate checks the field values on Service with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*Service) ValidateAll

func (m *Service) ValidateAll() error

ValidateAll checks the field values on Service with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ServiceMultiError, or nil if none found.

type ServiceMultiError

type ServiceMultiError []error

ServiceMultiError is an error wrapping multiple validation errors returned by Service.ValidateAll() if the designated constraints aren't met.

func (ServiceMultiError) AllErrors

func (m ServiceMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ServiceMultiError) Error

func (m ServiceMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ServiceValidationError

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

ServiceValidationError is the validation error returned by Service.Validate if the designated constraints aren't met.

func (ServiceValidationError) Cause

func (e ServiceValidationError) Cause() error

Cause function returns cause value.

func (ServiceValidationError) Error

func (e ServiceValidationError) Error() string

Error satisfies the builtin error interface

func (ServiceValidationError) ErrorName

func (e ServiceValidationError) ErrorName() string

ErrorName returns error name.

func (ServiceValidationError) Field

func (e ServiceValidationError) Field() string

Field function returns field value.

func (ServiceValidationError) Key

func (e ServiceValidationError) Key() bool

Key function returns key value.

func (ServiceValidationError) Reason

func (e ServiceValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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