agent

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Agent_GetElement_FullMethodName = "/cassem.agent.agent/GetElement"
	Agent_Unregister_FullMethodName = "/cassem.agent.agent/Unregister"
	Agent_Register_FullMethodName   = "/cassem.agent.agent/Register"
	Agent_Renew_FullMethodName      = "/cassem.agent.agent/Renew"
	Agent_Watch_FullMethodName      = "/cassem.agent.agent/Watch"
)
View Source
const (
	Delivery_Dispatch_FullMethodName = "/cassem.agent.delivery/Dispatch"
)

Variables

View Source
var Agent_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cassem.agent.agent",
	HandlerType: (*AgentServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetElement",
			Handler:    _Agent_GetElement_Handler,
		},
		{
			MethodName: "Unregister",
			Handler:    _Agent_Unregister_Handler,
		},
		{
			MethodName: "Register",
			Handler:    _Agent_Register_Handler,
		},
		{
			MethodName: "Renew",
			Handler:    _Agent_Renew_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Watch",
			Handler:       _Agent_Watch_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "cassemagent.api.proto",
}

Agent_ServiceDesc is the grpc.ServiceDesc for Agent service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Delivery_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cassem.agent.delivery",
	HandlerType: (*DeliveryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Dispatch",
			Handler:    _Delivery_Dispatch_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cassemagent.api.proto",
}

Delivery_ServiceDesc is the grpc.ServiceDesc for Delivery service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_cassemagent_api_proto protoreflect.FileDescriptor

Functions

func New

func New(agentAddress string, opts ...clientOption) (*agentInstanceClient, error)

func RegisterAgentServer

func RegisterAgentServer(s grpc.ServiceRegistrar, srv AgentServer)

func RegisterDeliveryServer

func RegisterDeliveryServer(s grpc.ServiceRegistrar, srv DeliveryServer)

func WithClientId

func WithClientId(clientId string) clientOption

func WithClientIp

func WithClientIp(clientIp string) clientOption

Types

type AgentClient

type AgentClient interface {
	GetElement(ctx context.Context, in *GetElementReq, opts ...grpc.CallOption) (*GetElementResp, error)
	Unregister(ctx context.Context, in *UnregisterReq, opts ...grpc.CallOption) (*EmptyResp, error)
	Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*EmptyResp, error)
	Renew(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*EmptyResp, error)
	Watch(ctx context.Context, in *WatchReq, opts ...grpc.CallOption) (Agent_WatchClient, error)
}

AgentClient is the client API for Agent service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewAgentClient

func NewAgentClient(cc grpc.ClientConnInterface) AgentClient

type AgentServer

type AgentServer interface {
	GetElement(context.Context, *GetElementReq) (*GetElementResp, error)
	Unregister(context.Context, *UnregisterReq) (*EmptyResp, error)
	Register(context.Context, *RegisterReq) (*EmptyResp, error)
	Renew(context.Context, *RegisterReq) (*EmptyResp, error)
	Watch(*WatchReq, Agent_WatchServer) error
	// contains filtered or unexported methods
}

AgentServer is the server API for Agent service. All implementations must embed UnimplementedAgentServer for forward compatibility

type Agent_WatchClient

type Agent_WatchClient interface {
	Recv() (*WatchResp, error)
	grpc.ClientStream
}

type Agent_WatchServer

type Agent_WatchServer interface {
	Send(*WatchResp) error
	grpc.ServerStream
}

type DeliveryClient

type DeliveryClient interface {
	Dispatch(ctx context.Context, in *DispatchReq, opts ...grpc.CallOption) (*DispatchResp, error)
}

DeliveryClient is the client API for Delivery service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func DialDelivery

func DialDelivery(addr string) (DeliveryClient, error)

func NewDeliveryClient

func NewDeliveryClient(cc grpc.ClientConnInterface) DeliveryClient

type DeliveryServer

type DeliveryServer interface {
	Dispatch(context.Context, *DispatchReq) (*DispatchResp, error)
	// contains filtered or unexported methods
}

DeliveryServer is the server API for Delivery service. All implementations must embed UnimplementedDeliveryServer for forward compatibility

type DispatchReq

type DispatchReq struct {
	Elems       []*concept.Element `protobuf:"bytes,1,rep,name=elems,proto3" json:"elems,omitempty"`
	InstanceIds []string           `protobuf:"bytes,2,rep,name=instanceIds,proto3" json:"instanceIds,omitempty"`
	// contains filtered or unexported fields
}

func (*DispatchReq) Descriptor deprecated

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

Deprecated: Use DispatchReq.ProtoReflect.Descriptor instead.

func (*DispatchReq) GetElems

func (x *DispatchReq) GetElems() []*concept.Element

func (*DispatchReq) GetInstanceIds added in v1.0.1

func (x *DispatchReq) GetInstanceIds() []string

func (*DispatchReq) ProtoMessage

func (*DispatchReq) ProtoMessage()

func (*DispatchReq) ProtoReflect added in v1.0.1

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

func (*DispatchReq) Reset

func (x *DispatchReq) Reset()

func (*DispatchReq) String

func (x *DispatchReq) String() string

func (*DispatchReq) Validate

func (m *DispatchReq) Validate() error

Validate checks the field values on DispatchReq 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 (*DispatchReq) ValidateAll added in v1.0.1

func (m *DispatchReq) ValidateAll() error

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

type DispatchReqMultiError added in v1.0.1

type DispatchReqMultiError []error

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

func (DispatchReqMultiError) AllErrors added in v1.0.1

func (m DispatchReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DispatchReqMultiError) Error added in v1.0.1

func (m DispatchReqMultiError) Error() string

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

type DispatchReqValidationError

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

DispatchReqValidationError is the validation error returned by DispatchReq.Validate if the designated constraints aren't met.

func (DispatchReqValidationError) Cause

Cause function returns cause value.

func (DispatchReqValidationError) Error

Error satisfies the builtin error interface

func (DispatchReqValidationError) ErrorName

func (e DispatchReqValidationError) ErrorName() string

ErrorName returns error name.

func (DispatchReqValidationError) Field

Field function returns field value.

func (DispatchReqValidationError) Key

Key function returns key value.

func (DispatchReqValidationError) Reason

Reason function returns reason value.

type DispatchResp

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

func (*DispatchResp) Descriptor deprecated

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

Deprecated: Use DispatchResp.ProtoReflect.Descriptor instead.

func (*DispatchResp) ProtoMessage

func (*DispatchResp) ProtoMessage()

func (*DispatchResp) ProtoReflect added in v1.0.1

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

func (*DispatchResp) Reset

func (x *DispatchResp) Reset()

func (*DispatchResp) String

func (x *DispatchResp) String() string

func (*DispatchResp) Validate

func (m *DispatchResp) Validate() error

Validate checks the field values on DispatchResp 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 (*DispatchResp) ValidateAll added in v1.0.1

func (m *DispatchResp) ValidateAll() error

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

type DispatchRespMultiError added in v1.0.1

type DispatchRespMultiError []error

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

func (DispatchRespMultiError) AllErrors added in v1.0.1

func (m DispatchRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (DispatchRespMultiError) Error added in v1.0.1

func (m DispatchRespMultiError) Error() string

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

type DispatchRespValidationError

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

DispatchRespValidationError is the validation error returned by DispatchResp.Validate if the designated constraints aren't met.

func (DispatchRespValidationError) Cause

Cause function returns cause value.

func (DispatchRespValidationError) Error

Error satisfies the builtin error interface

func (DispatchRespValidationError) ErrorName

func (e DispatchRespValidationError) ErrorName() string

ErrorName returns error name.

func (DispatchRespValidationError) Field

Field function returns field value.

func (DispatchRespValidationError) Key

Key function returns key value.

func (DispatchRespValidationError) Reason

Reason function returns reason value.

type EmptyResp

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

func (*EmptyResp) Descriptor deprecated

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

Deprecated: Use EmptyResp.ProtoReflect.Descriptor instead.

func (*EmptyResp) ProtoMessage

func (*EmptyResp) ProtoMessage()

func (*EmptyResp) ProtoReflect added in v1.0.1

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

func (*EmptyResp) Reset

func (x *EmptyResp) Reset()

func (*EmptyResp) String

func (x *EmptyResp) String() string

func (*EmptyResp) Validate

func (m *EmptyResp) Validate() error

Validate checks the field values on EmptyResp 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 (*EmptyResp) ValidateAll added in v1.0.1

func (m *EmptyResp) ValidateAll() error

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

type EmptyRespMultiError added in v1.0.1

type EmptyRespMultiError []error

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

func (EmptyRespMultiError) AllErrors added in v1.0.1

func (m EmptyRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (EmptyRespMultiError) Error added in v1.0.1

func (m EmptyRespMultiError) Error() string

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

type EmptyRespValidationError

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

EmptyRespValidationError is the validation error returned by EmptyResp.Validate if the designated constraints aren't met.

func (EmptyRespValidationError) Cause

func (e EmptyRespValidationError) Cause() error

Cause function returns cause value.

func (EmptyRespValidationError) Error

func (e EmptyRespValidationError) Error() string

Error satisfies the builtin error interface

func (EmptyRespValidationError) ErrorName

func (e EmptyRespValidationError) ErrorName() string

ErrorName returns error name.

func (EmptyRespValidationError) Field

func (e EmptyRespValidationError) Field() string

Field function returns field value.

func (EmptyRespValidationError) Key

Key function returns key value.

func (EmptyRespValidationError) Reason

func (e EmptyRespValidationError) Reason() string

Reason function returns reason value.

type GetElementReq

type GetElementReq struct {
	App  string   `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	Env  string   `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"`
	Keys []string `protobuf:"bytes,3,rep,name=keys,proto3" json:"keys,omitempty"`
	// contains filtered or unexported fields
}

func (*GetElementReq) Descriptor deprecated

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

Deprecated: Use GetElementReq.ProtoReflect.Descriptor instead.

func (*GetElementReq) GetApp

func (x *GetElementReq) GetApp() string

func (*GetElementReq) GetEnv

func (x *GetElementReq) GetEnv() string

func (*GetElementReq) GetKeys

func (x *GetElementReq) GetKeys() []string

func (*GetElementReq) ProtoMessage

func (*GetElementReq) ProtoMessage()

func (*GetElementReq) ProtoReflect added in v1.0.1

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

func (*GetElementReq) Reset

func (x *GetElementReq) Reset()

func (*GetElementReq) String

func (x *GetElementReq) String() string

func (*GetElementReq) Validate

func (m *GetElementReq) Validate() error

Validate checks the field values on GetElementReq 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 (*GetElementReq) ValidateAll added in v1.0.1

func (m *GetElementReq) ValidateAll() error

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

type GetElementReqMultiError added in v1.0.1

type GetElementReqMultiError []error

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

func (GetElementReqMultiError) AllErrors added in v1.0.1

func (m GetElementReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetElementReqMultiError) Error added in v1.0.1

func (m GetElementReqMultiError) Error() string

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

type GetElementReqValidationError

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

GetElementReqValidationError is the validation error returned by GetElementReq.Validate if the designated constraints aren't met.

func (GetElementReqValidationError) Cause

Cause function returns cause value.

func (GetElementReqValidationError) Error

Error satisfies the builtin error interface

func (GetElementReqValidationError) ErrorName

func (e GetElementReqValidationError) ErrorName() string

ErrorName returns error name.

func (GetElementReqValidationError) Field

Field function returns field value.

func (GetElementReqValidationError) Key

Key function returns key value.

func (GetElementReqValidationError) Reason

Reason function returns reason value.

type GetElementResp

type GetElementResp struct {
	Elems []*concept.Element `protobuf:"bytes,1,rep,name=elems,proto3" json:"elems,omitempty"`
	// contains filtered or unexported fields
}

func (*GetElementResp) Descriptor deprecated

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

Deprecated: Use GetElementResp.ProtoReflect.Descriptor instead.

func (*GetElementResp) GetElems

func (x *GetElementResp) GetElems() []*concept.Element

func (*GetElementResp) ProtoMessage

func (*GetElementResp) ProtoMessage()

func (*GetElementResp) ProtoReflect added in v1.0.1

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

func (*GetElementResp) Reset

func (x *GetElementResp) Reset()

func (*GetElementResp) String

func (x *GetElementResp) String() string

func (*GetElementResp) Validate

func (m *GetElementResp) Validate() error

Validate checks the field values on GetElementResp 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 (*GetElementResp) ValidateAll added in v1.0.1

func (m *GetElementResp) ValidateAll() error

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

type GetElementRespMultiError added in v1.0.1

type GetElementRespMultiError []error

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

func (GetElementRespMultiError) AllErrors added in v1.0.1

func (m GetElementRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetElementRespMultiError) Error added in v1.0.1

func (m GetElementRespMultiError) Error() string

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

type GetElementRespValidationError

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

GetElementRespValidationError is the validation error returned by GetElementResp.Validate if the designated constraints aren't met.

func (GetElementRespValidationError) Cause

Cause function returns cause value.

func (GetElementRespValidationError) Error

Error satisfies the builtin error interface

func (GetElementRespValidationError) ErrorName

func (e GetElementRespValidationError) ErrorName() string

ErrorName returns error name.

func (GetElementRespValidationError) Field

Field function returns field value.

func (GetElementRespValidationError) Key

Key function returns key value.

func (GetElementRespValidationError) Reason

Reason function returns reason value.

type RegisterReq

type RegisterReq struct {
	ClientId string                       `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	ClientIp string                       `protobuf:"bytes,2,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
	Watching []*concept.Instance_Watching `protobuf:"bytes,3,rep,name=watching,proto3" json:"watching,omitempty"`
	// contains filtered or unexported fields
}

func (*RegisterReq) Descriptor deprecated

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

Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.

func (*RegisterReq) GetClientId

func (x *RegisterReq) GetClientId() string

func (*RegisterReq) GetClientIp

func (x *RegisterReq) GetClientIp() string

func (*RegisterReq) GetWatching

func (x *RegisterReq) GetWatching() []*concept.Instance_Watching

func (*RegisterReq) ProtoMessage

func (*RegisterReq) ProtoMessage()

func (*RegisterReq) ProtoReflect added in v1.0.1

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

func (*RegisterReq) Reset

func (x *RegisterReq) Reset()

func (*RegisterReq) String

func (x *RegisterReq) String() string

func (*RegisterReq) Validate

func (m *RegisterReq) Validate() error

Validate checks the field values on RegisterReq 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 (*RegisterReq) ValidateAll added in v1.0.1

func (m *RegisterReq) ValidateAll() error

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

type RegisterReqMultiError added in v1.0.1

type RegisterReqMultiError []error

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

func (RegisterReqMultiError) AllErrors added in v1.0.1

func (m RegisterReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (RegisterReqMultiError) Error added in v1.0.1

func (m RegisterReqMultiError) Error() string

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

type RegisterReqValidationError

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

RegisterReqValidationError is the validation error returned by RegisterReq.Validate if the designated constraints aren't met.

func (RegisterReqValidationError) Cause

Cause function returns cause value.

func (RegisterReqValidationError) Error

Error satisfies the builtin error interface

func (RegisterReqValidationError) ErrorName

func (e RegisterReqValidationError) ErrorName() string

ErrorName returns error name.

func (RegisterReqValidationError) Field

Field function returns field value.

func (RegisterReqValidationError) Key

Key function returns key value.

func (RegisterReqValidationError) Reason

Reason function returns reason value.

type UnimplementedAgentServer

type UnimplementedAgentServer struct {
}

UnimplementedAgentServer must be embedded to have forward compatible implementations.

func (UnimplementedAgentServer) GetElement

func (UnimplementedAgentServer) Register

func (UnimplementedAgentServer) Renew

func (UnimplementedAgentServer) Unregister

func (UnimplementedAgentServer) Watch

type UnimplementedDeliveryServer

type UnimplementedDeliveryServer struct {
}

UnimplementedDeliveryServer must be embedded to have forward compatible implementations.

func (UnimplementedDeliveryServer) Dispatch

type UnregisterReq

type UnregisterReq struct {
	ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
	ClientIp string `protobuf:"bytes,2,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
	// contains filtered or unexported fields
}

func (*UnregisterReq) Descriptor deprecated

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

Deprecated: Use UnregisterReq.ProtoReflect.Descriptor instead.

func (*UnregisterReq) GetClientId

func (x *UnregisterReq) GetClientId() string

func (*UnregisterReq) GetClientIp

func (x *UnregisterReq) GetClientIp() string

func (*UnregisterReq) ProtoMessage

func (*UnregisterReq) ProtoMessage()

func (*UnregisterReq) ProtoReflect added in v1.0.1

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

func (*UnregisterReq) Reset

func (x *UnregisterReq) Reset()

func (*UnregisterReq) String

func (x *UnregisterReq) String() string

func (*UnregisterReq) Validate

func (m *UnregisterReq) Validate() error

Validate checks the field values on UnregisterReq 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 (*UnregisterReq) ValidateAll added in v1.0.1

func (m *UnregisterReq) ValidateAll() error

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

type UnregisterReqMultiError added in v1.0.1

type UnregisterReqMultiError []error

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

func (UnregisterReqMultiError) AllErrors added in v1.0.1

func (m UnregisterReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UnregisterReqMultiError) Error added in v1.0.1

func (m UnregisterReqMultiError) Error() string

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

type UnregisterReqValidationError

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

UnregisterReqValidationError is the validation error returned by UnregisterReq.Validate if the designated constraints aren't met.

func (UnregisterReqValidationError) Cause

Cause function returns cause value.

func (UnregisterReqValidationError) Error

Error satisfies the builtin error interface

func (UnregisterReqValidationError) ErrorName

func (e UnregisterReqValidationError) ErrorName() string

ErrorName returns error name.

func (UnregisterReqValidationError) Field

Field function returns field value.

func (UnregisterReqValidationError) Key

Key function returns key value.

func (UnregisterReqValidationError) Reason

Reason function returns reason value.

type UnsafeAgentServer added in v1.0.1

type UnsafeAgentServer interface {
	// contains filtered or unexported methods
}

UnsafeAgentServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AgentServer will result in compilation errors.

type UnsafeDeliveryServer added in v1.0.1

type UnsafeDeliveryServer interface {
	// contains filtered or unexported methods
}

UnsafeDeliveryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DeliveryServer will result in compilation errors.

type WatchHandlerFunc

type WatchHandlerFunc func(next *concept.Element)

type WatchReq

type WatchReq struct {
	Watching []*concept.Instance_Watching `protobuf:"bytes,1,rep,name=watching,proto3" json:"watching,omitempty"`
	// string app = 1 [(validate.rules).string = {min_len: 3, max_len: 30}];
	// string env = 2 [(validate.rules).string = {min_len: 3, max_len: 30}];
	// repeated string watchingKeys = 3 [(validate.rules).repeated = {unique: true, min_items: 1, max_items: 100}];
	ClientId string `protobuf:"bytes,4,opt,name=clientId,proto3" json:"clientId,omitempty"`
	ClientIp string `protobuf:"bytes,5,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchReq) Descriptor deprecated

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

Deprecated: Use WatchReq.ProtoReflect.Descriptor instead.

func (*WatchReq) GetClientId

func (x *WatchReq) GetClientId() string

func (*WatchReq) GetClientIp

func (x *WatchReq) GetClientIp() string

func (*WatchReq) GetWatching

func (x *WatchReq) GetWatching() []*concept.Instance_Watching

func (*WatchReq) ProtoMessage

func (*WatchReq) ProtoMessage()

func (*WatchReq) ProtoReflect added in v1.0.1

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

func (*WatchReq) Reset

func (x *WatchReq) Reset()

func (*WatchReq) String

func (x *WatchReq) String() string

func (*WatchReq) Validate

func (m *WatchReq) Validate() error

Validate checks the field values on WatchReq 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 (*WatchReq) ValidateAll added in v1.0.1

func (m *WatchReq) ValidateAll() error

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

type WatchReqMultiError added in v1.0.1

type WatchReqMultiError []error

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

func (WatchReqMultiError) AllErrors added in v1.0.1

func (m WatchReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchReqMultiError) Error added in v1.0.1

func (m WatchReqMultiError) Error() string

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

type WatchReqValidationError

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

WatchReqValidationError is the validation error returned by WatchReq.Validate if the designated constraints aren't met.

func (WatchReqValidationError) Cause

func (e WatchReqValidationError) Cause() error

Cause function returns cause value.

func (WatchReqValidationError) Error

func (e WatchReqValidationError) Error() string

Error satisfies the builtin error interface

func (WatchReqValidationError) ErrorName

func (e WatchReqValidationError) ErrorName() string

ErrorName returns error name.

func (WatchReqValidationError) Field

func (e WatchReqValidationError) Field() string

Field function returns field value.

func (WatchReqValidationError) Key

func (e WatchReqValidationError) Key() bool

Key function returns key value.

func (WatchReqValidationError) Reason

func (e WatchReqValidationError) Reason() string

Reason function returns reason value.

type WatchResp

type WatchResp struct {
	Elem *concept.Element `protobuf:"bytes,1,opt,name=elem,proto3" json:"elem,omitempty"`
	// contains filtered or unexported fields
}

func (*WatchResp) Descriptor deprecated

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

Deprecated: Use WatchResp.ProtoReflect.Descriptor instead.

func (*WatchResp) GetElem

func (x *WatchResp) GetElem() *concept.Element

func (*WatchResp) ProtoMessage

func (*WatchResp) ProtoMessage()

func (*WatchResp) ProtoReflect added in v1.0.1

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

func (*WatchResp) Reset

func (x *WatchResp) Reset()

func (*WatchResp) String

func (x *WatchResp) String() string

func (*WatchResp) Validate

func (m *WatchResp) Validate() error

Validate checks the field values on WatchResp 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 (*WatchResp) ValidateAll added in v1.0.1

func (m *WatchResp) ValidateAll() error

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

type WatchRespMultiError added in v1.0.1

type WatchRespMultiError []error

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

func (WatchRespMultiError) AllErrors added in v1.0.1

func (m WatchRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (WatchRespMultiError) Error added in v1.0.1

func (m WatchRespMultiError) Error() string

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

type WatchRespValidationError

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

WatchRespValidationError is the validation error returned by WatchResp.Validate if the designated constraints aren't met.

func (WatchRespValidationError) Cause

func (e WatchRespValidationError) Cause() error

Cause function returns cause value.

func (WatchRespValidationError) Error

func (e WatchRespValidationError) Error() string

Error satisfies the builtin error interface

func (WatchRespValidationError) ErrorName

func (e WatchRespValidationError) ErrorName() string

ErrorName returns error name.

func (WatchRespValidationError) Field

func (e WatchRespValidationError) Field() string

Field function returns field value.

func (WatchRespValidationError) Key

Key function returns key value.

func (WatchRespValidationError) Reason

func (e WatchRespValidationError) 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