common

package
v0.0.0-...-09abd0a Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: Apache-2.0 Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthAddress = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAddress   = fmt.Errorf("proto: integer overflow")
)
View Source
var (
	ErrInvalidLengthInstance = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowInstance   = fmt.Errorf("proto: integer overflow")
)
View Source
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.

View Source
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.

View Source
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.

View Source
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) Descriptor() ([]byte, []int)

func (*Address) Equal

func (this *Address) Equal(that interface{}) bool

func (*Address) GetIp

func (m *Address) GetIp() string

func (*Address) GetPort

func (m *Address) GetPort() uint32

func (*Address) GoString

func (this *Address) GoString() string

func (*Address) Marshal

func (m *Address) Marshal() (dAtA []byte, err error)

func (*Address) MarshalJSON

func (m *Address) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.

func (*Address) MarshalTo

func (m *Address) MarshalTo(dAtA []byte) (int, error)

func (*Address) MarshalToSizedBuffer

func (m *Address) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) Reset

func (m *Address) Reset()

func (*Address) Size

func (m *Address) Size() (n int)

func (*Address) String

func (m *Address) String() string

func (*Address) Unmarshal

func (m *Address) Unmarshal(dAtA []byte) error

func (*Address) UnmarshalJSON

func (m *Address) UnmarshalJSON(b []byte) error

UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.

func (*Address) Validate

func (m *Address) Validate() error

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 (this *Address) VerboseEqual(that interface{}) error

func (*Address) XXX_DiscardUnknown

func (m *Address) XXX_DiscardUnknown()

func (*Address) XXX_Marshal

func (m *Address) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Address) XXX_Merge

func (m *Address) XXX_Merge(src proto.Message)

func (*Address) XXX_Size

func (m *Address) XXX_Size() int

func (*Address) XXX_Unmarshal

func (m *Address) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Instance) Equal

func (this *Instance) Equal(that interface{}) bool

func (*Instance) GetBelong

func (m *Instance) GetBelong() string

func (*Instance) GetId

func (m *Instance) GetId() string

func (*Instance) GetVersion

func (m *Instance) GetVersion() string

func (*Instance) GoString

func (this *Instance) GoString() string

func (*Instance) Marshal

func (m *Instance) Marshal() (dAtA []byte, err error)

func (*Instance) MarshalJSON

func (m *Instance) MarshalJSON() ([]byte, error)

MarshalJSON satisfies the encoding/json Marshaler interface. This method uses the more correct jsonpb package to correctly marshal the message.

func (*Instance) MarshalTo

func (m *Instance) MarshalTo(dAtA []byte) (int, error)

func (*Instance) MarshalToSizedBuffer

func (m *Instance) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Instance) ProtoMessage

func (*Instance) ProtoMessage()

func (*Instance) Reset

func (m *Instance) Reset()

func (*Instance) Size

func (m *Instance) Size() (n int)

func (*Instance) String

func (m *Instance) String() string

func (*Instance) Unmarshal

func (m *Instance) Unmarshal(dAtA []byte) error

func (*Instance) UnmarshalJSON

func (m *Instance) UnmarshalJSON(b []byte) error

UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method uses the more correct jsonpb package to correctly unmarshal the message.

func (*Instance) Validate

func (m *Instance) Validate() error

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 (this *Instance) VerboseEqual(that interface{}) error

func (*Instance) XXX_DiscardUnknown

func (m *Instance) XXX_DiscardUnknown()

func (*Instance) XXX_Marshal

func (m *Instance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Instance) XXX_Merge

func (m *Instance) XXX_Merge(src proto.Message)

func (*Instance) XXX_Size

func (m *Instance) XXX_Size() int

func (*Instance) XXX_Unmarshal

func (m *Instance) XXX_Unmarshal(b []byte) error

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.

Jump to

Keyboard shortcuts

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