registry

package
v0.0.0-...-2dd5fde Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRegistryServer

func RegisterRegistryServer(s *grpc.Server, srv RegistryServer)

Types

type RegisterResponse

type RegisterResponse struct {
	Message              string   `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

simple response when you sign up

func (*RegisterResponse) Descriptor

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

func (*RegisterResponse) GetMessage

func (m *RegisterResponse) GetMessage() string

func (*RegisterResponse) ProtoMessage

func (*RegisterResponse) ProtoMessage()

func (*RegisterResponse) Reset

func (m *RegisterResponse) Reset()

func (*RegisterResponse) String

func (m *RegisterResponse) String() string

func (*RegisterResponse) XXX_DiscardUnknown

func (m *RegisterResponse) XXX_DiscardUnknown()

func (*RegisterResponse) XXX_Marshal

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

func (*RegisterResponse) XXX_Merge

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

func (*RegisterResponse) XXX_Size

func (m *RegisterResponse) XXX_Size() int

func (*RegisterResponse) XXX_Unmarshal

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

type Registration

type Registration struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Ipv4                 string   `protobuf:"bytes,2,opt,name=ipv4,proto3" json:"ipv4,omitempty"`
	Port                 string   `protobuf:"bytes,3,opt,name=port,proto3" json:"port,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

we define what a registration needs to have all optional and self explanatory

func (*Registration) Descriptor

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

func (*Registration) GetIpv4

func (m *Registration) GetIpv4() string

func (*Registration) GetName

func (m *Registration) GetName() string

func (*Registration) GetPort

func (m *Registration) GetPort() string

func (*Registration) ProtoMessage

func (*Registration) ProtoMessage()

func (*Registration) Reset

func (m *Registration) Reset()

func (*Registration) String

func (m *Registration) String() string

func (*Registration) XXX_DiscardUnknown

func (m *Registration) XXX_DiscardUnknown()

func (*Registration) XXX_Marshal

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

func (*Registration) XXX_Merge

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

func (*Registration) XXX_Size

func (m *Registration) XXX_Size() int

func (*Registration) XXX_Unmarshal

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

type RegistrationList

type RegistrationList struct {
	Registrations        []*Registration `protobuf:"bytes,1,rep,name=registrations,proto3" json:"registrations,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

a list/array of registrations

func (*RegistrationList) Descriptor

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

func (*RegistrationList) GetRegistrations

func (m *RegistrationList) GetRegistrations() []*Registration

func (*RegistrationList) ProtoMessage

func (*RegistrationList) ProtoMessage()

func (*RegistrationList) Reset

func (m *RegistrationList) Reset()

func (*RegistrationList) String

func (m *RegistrationList) String() string

func (*RegistrationList) XXX_DiscardUnknown

func (m *RegistrationList) XXX_DiscardUnknown()

func (*RegistrationList) XXX_Marshal

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

func (*RegistrationList) XXX_Merge

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

func (*RegistrationList) XXX_Size

func (m *RegistrationList) XXX_Size() int

func (*RegistrationList) XXX_Unmarshal

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

type RegistryClient

type RegistryClient interface {
	Register(ctx context.Context, in *Registration, opts ...grpc.CallOption) (*RegisterResponse, error)
	Unregister(ctx context.Context, in *Registration, opts ...grpc.CallOption) (*RegisterResponse, error)
	FetchServiceLocation(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RegistrationList, error)
}

RegistryClient is the client API for Registry service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewRegistryClient

func NewRegistryClient(cc *grpc.ClientConn) RegistryClient

type RegistryServer

type RegistryServer interface {
	Register(context.Context, *Registration) (*RegisterResponse, error)
	Unregister(context.Context, *Registration) (*RegisterResponse, error)
	FetchServiceLocation(context.Context, *empty.Empty) (*RegistrationList, error)
}

RegistryServer is the server API for Registry service.

Jump to

Keyboard shortcuts

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