conf

package
v0.0.10 Latest Latest
Warning

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

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

README

conf

服务私有配置

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_app_nodeid_service_internal_conf_config_conf_proto protoreflect.FileDescriptor

Functions

func LoadServiceConfig

func LoadServiceConfig() []configutil.Option

LoadServiceConfig 加载服务配置 由 setuputil.NewLauncherManager 进行加载赋值

Types

type ServiceConfig

type ServiceConfig struct {
	NodeidService *ServiceConfig_NodeidService `protobuf:"bytes,1,opt,name=nodeid_service,json=nodeidService,proto3" json:"nodeid_service,omitempty"`
	// contains filtered or unexported fields
}

func GetServiceConfig

func GetServiceConfig() *ServiceConfig

func (*ServiceConfig) Descriptor deprecated

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

Deprecated: Use ServiceConfig.ProtoReflect.Descriptor instead.

func (*ServiceConfig) GetNodeidService

func (x *ServiceConfig) GetNodeidService() *ServiceConfig_NodeidService

func (*ServiceConfig) ProtoMessage

func (*ServiceConfig) ProtoMessage()

func (*ServiceConfig) ProtoReflect

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

func (*ServiceConfig) Reset

func (x *ServiceConfig) Reset()

func (*ServiceConfig) String

func (x *ServiceConfig) String() string

func (*ServiceConfig) Validate

func (m *ServiceConfig) Validate() error

Validate checks the field values on ServiceConfig 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 (*ServiceConfig) ValidateAll

func (m *ServiceConfig) ValidateAll() error

ValidateAll checks the field values on ServiceConfig 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 ServiceConfigMultiError, or nil if none found.

type ServiceConfigMultiError

type ServiceConfigMultiError []error

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

func (ServiceConfigMultiError) AllErrors

func (m ServiceConfigMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ServiceConfigMultiError) Error

func (m ServiceConfigMultiError) Error() string

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

type ServiceConfigValidationError

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

ServiceConfigValidationError is the validation error returned by ServiceConfig.Validate if the designated constraints aren't met.

func (ServiceConfigValidationError) Cause

Cause function returns cause value.

func (ServiceConfigValidationError) Error

Error satisfies the builtin error interface

func (ServiceConfigValidationError) ErrorName

func (e ServiceConfigValidationError) ErrorName() string

ErrorName returns error name.

func (ServiceConfigValidationError) Field

Field function returns field value.

func (ServiceConfigValidationError) Key

Key function returns key value.

func (ServiceConfigValidationError) Reason

Reason function returns reason value.

type ServiceConfig_NodeidService

type ServiceConfig_NodeidService struct {
	MinNodeId         int64                `protobuf:"varint,1,opt,name=min_node_id,json=minNodeId,proto3" json:"min_node_id,omitempty"`                      // 最小节点默认值:1
	MaxNodeId         int64                `protobuf:"varint,2,opt,name=max_node_id,json=maxNodeId,proto3" json:"max_node_id,omitempty"`                      // 最大节点默认值:1023;
	IdleDuration      *durationpb.Duration `protobuf:"bytes,3,opt,name=idle_duration,json=idleDuration,proto3" json:"idle_duration,omitempty"`                // 空闲释放时间;默认:100s。
	HeartbeatInterval *durationpb.Duration `protobuf:"bytes,4,opt,name=heartbeat_interval,json=heartbeatInterval,proto3" json:"heartbeat_interval,omitempty"` // 心跳续订延长的时间;默认:30s。范围:[1, idle_duration];延长有效期:now()+idle_duration
	// contains filtered or unexported fields
}

func (*ServiceConfig_NodeidService) Descriptor deprecated

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

Deprecated: Use ServiceConfig_NodeidService.ProtoReflect.Descriptor instead.

func (*ServiceConfig_NodeidService) GetHeartbeatInterval

func (x *ServiceConfig_NodeidService) GetHeartbeatInterval() *durationpb.Duration

func (*ServiceConfig_NodeidService) GetIdleDuration

func (x *ServiceConfig_NodeidService) GetIdleDuration() *durationpb.Duration

func (*ServiceConfig_NodeidService) GetMaxNodeId

func (x *ServiceConfig_NodeidService) GetMaxNodeId() int64

func (*ServiceConfig_NodeidService) GetMinNodeId

func (x *ServiceConfig_NodeidService) GetMinNodeId() int64

func (*ServiceConfig_NodeidService) ProtoMessage

func (*ServiceConfig_NodeidService) ProtoMessage()

func (*ServiceConfig_NodeidService) ProtoReflect

func (*ServiceConfig_NodeidService) Reset

func (x *ServiceConfig_NodeidService) Reset()

func (*ServiceConfig_NodeidService) String

func (x *ServiceConfig_NodeidService) String() string

func (*ServiceConfig_NodeidService) Validate

func (m *ServiceConfig_NodeidService) Validate() error

Validate checks the field values on ServiceConfig_NodeidService 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 (*ServiceConfig_NodeidService) ValidateAll

func (m *ServiceConfig_NodeidService) ValidateAll() error

ValidateAll checks the field values on ServiceConfig_NodeidService 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 ServiceConfig_NodeidServiceMultiError, or nil if none found.

type ServiceConfig_NodeidServiceMultiError

type ServiceConfig_NodeidServiceMultiError []error

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

func (ServiceConfig_NodeidServiceMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (ServiceConfig_NodeidServiceMultiError) Error

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

type ServiceConfig_NodeidServiceValidationError

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

ServiceConfig_NodeidServiceValidationError is the validation error returned by ServiceConfig_NodeidService.Validate if the designated constraints aren't met.

func (ServiceConfig_NodeidServiceValidationError) Cause

Cause function returns cause value.

func (ServiceConfig_NodeidServiceValidationError) Error

Error satisfies the builtin error interface

func (ServiceConfig_NodeidServiceValidationError) ErrorName

ErrorName returns error name.

func (ServiceConfig_NodeidServiceValidationError) Field

Field function returns field value.

func (ServiceConfig_NodeidServiceValidationError) Key

Key function returns key value.

func (ServiceConfig_NodeidServiceValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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