Documentation
¶
Index ¶
- Variables
- type Address
- func (*Address) Descriptor() ([]byte, []int)
- func (this *Address) Equal(that interface{}) bool
- func (m *Address) GetIp() string
- func (m *Address) GetPort() uint32
- func (this *Address) GoString() string
- func (m *Address) Marshal() (dAtA []byte, err error)
- func (m *Address) MarshalJSON() ([]byte, error)
- func (m *Address) MarshalTo(dAtA []byte) (int, error)
- func (m *Address) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Address) ProtoMessage()
- func (m *Address) Reset()
- func (m *Address) Size() (n int)
- func (m *Address) String() string
- func (m *Address) Unmarshal(dAtA []byte) error
- func (m *Address) UnmarshalJSON(b []byte) error
- func (m *Address) Validate() error
- func (this *Address) VerboseEqual(that interface{}) error
- func (m *Address) XXX_DiscardUnknown()
- func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Address) XXX_Merge(src proto.Message)
- func (m *Address) XXX_Size() int
- func (m *Address) XXX_Unmarshal(b []byte) error
- type AddressValidationError
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)
- func (this *Instance) Equal(that interface{}) bool
- func (m *Instance) GetBelong() string
- func (m *Instance) GetId() string
- func (m *Instance) GetVersion() string
- func (this *Instance) GoString() string
- func (m *Instance) Marshal() (dAtA []byte, err error)
- func (m *Instance) MarshalJSON() ([]byte, error)
- func (m *Instance) MarshalTo(dAtA []byte) (int, error)
- func (m *Instance) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Instance) ProtoMessage()
- func (m *Instance) Reset()
- func (m *Instance) Size() (n int)
- func (m *Instance) String() string
- func (m *Instance) Unmarshal(dAtA []byte) error
- func (m *Instance) UnmarshalJSON(b []byte) error
- func (m *Instance) Validate() error
- func (this *Instance) VerboseEqual(that interface{}) error
- func (m *Instance) XXX_DiscardUnknown()
- func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Instance) XXX_Merge(src proto.Message)
- func (m *Instance) XXX_Size() int
- func (m *Instance) XXX_Unmarshal(b []byte) error
- type InstanceValidationError
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthAddress = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAddress = fmt.Errorf("proto: integer overflow") )
var ( ErrInvalidLengthInstance = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowInstance = fmt.Errorf("proto: integer overflow") )
var AddressJSONMarshaler = new(jsonpb.Marshaler)
AddressJSONMarshaler describes the default jsonpb.Marshaler used by all instances of Address. This struct is safe to replace or modify but should not be done so concurrently.
var AddressJSONUnmarshaler = new(jsonpb.Unmarshaler)
AddressJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of Address. This struct is safe to replace or modify but should not be done so concurrently.
var InstanceJSONMarshaler = new(jsonpb.Marshaler)
InstanceJSONMarshaler describes the default jsonpb.Marshaler used by all instances of Instance. This struct is safe to replace or modify but should not be done so concurrently.
var InstanceJSONUnmarshaler = new(jsonpb.Unmarshaler)
InstanceJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all instances of Instance. This struct is safe to replace or modify but should not be done so concurrently.
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { // IP address, IPv4 or IPv6. Ip string `protobuf:"bytes,1,opt,name=ip,proto3" json:"ip,omitempty"` // Port, [0, 65535]. Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Address) Descriptor ¶
func (*Address) MarshalJSON ¶
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*Address) MarshalToSizedBuffer ¶
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) UnmarshalJSON ¶
UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.
func (*Address) Validate ¶
Validate checks the field values on Address with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Address) VerboseEqual ¶
func (*Address) XXX_DiscardUnknown ¶
func (m *Address) XXX_DiscardUnknown()
func (*Address) XXX_Marshal ¶
func (*Address) XXX_Unmarshal ¶
type AddressValidationError ¶
type AddressValidationError struct {
// contains filtered or unexported fields
}
AddressValidationError is the validation error returned by Address.Validate if the designated constraints aren't met.
func (AddressValidationError) Cause ¶
func (e AddressValidationError) Cause() error
Cause function returns cause value.
func (AddressValidationError) Error ¶
func (e AddressValidationError) Error() string
Error satisfies the builtin error interface
func (AddressValidationError) ErrorName ¶
func (e AddressValidationError) ErrorName() string
ErrorName returns error name.
func (AddressValidationError) Field ¶
func (e AddressValidationError) Field() string
Field function returns field value.
func (AddressValidationError) Key ¶
func (e AddressValidationError) Key() bool
Key function returns key value.
func (AddressValidationError) Reason ¶
func (e AddressValidationError) Reason() string
Reason function returns reason value.
type Instance ¶
type Instance struct { // The id of this instance, if id is not define, it will generate by ip and // admin port. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Version of this instance running now. // This field is automatically populated by Samaritan // does not require to specify by user. Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // The service name which this instance belongs to. // It's required when you want to change the behavior of Sam at runtime, such as // update proxy policy, update service endpoints, etc. If two instances belong to // the same service, it will be treated in one group. Belong string `protobuf:"bytes,3,opt,name=belong,proto3" json:"belong,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Instance) Descriptor ¶
func (*Instance) GetVersion ¶
func (*Instance) MarshalJSON ¶
MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.
func (*Instance) MarshalToSizedBuffer ¶
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) UnmarshalJSON ¶
UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.
func (*Instance) Validate ¶
Validate checks the field values on Instance with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
func (*Instance) VerboseEqual ¶
func (*Instance) XXX_DiscardUnknown ¶
func (m *Instance) XXX_DiscardUnknown()
func (*Instance) XXX_Marshal ¶
func (*Instance) XXX_Unmarshal ¶
type InstanceValidationError ¶
type InstanceValidationError struct {
// contains filtered or unexported fields
}
InstanceValidationError is the validation error returned by Instance.Validate if the designated constraints aren't met.
func (InstanceValidationError) Cause ¶
func (e InstanceValidationError) Cause() error
Cause function returns cause value.
func (InstanceValidationError) Error ¶
func (e InstanceValidationError) Error() string
Error satisfies the builtin error interface
func (InstanceValidationError) ErrorName ¶
func (e InstanceValidationError) ErrorName() string
ErrorName returns error name.
func (InstanceValidationError) Field ¶
func (e InstanceValidationError) Field() string
Field function returns field value.
func (InstanceValidationError) Key ¶
func (e InstanceValidationError) Key() bool
Key function returns key value.
func (InstanceValidationError) Reason ¶
func (e InstanceValidationError) Reason() string
Reason function returns reason value.