go_micro_server

package
v2.9.4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFileEndpoints

func NewFileEndpoints() []*api.Endpoint

func RegisterFileHandler

func RegisterFileHandler(s server.Server, hdlr FileHandler, opts ...server.HandlerOption) error

func RegisterFileServer

func RegisterFileServer(s *grpc.Server, srv FileServer)

Types

type CloseRequest

type CloseRequest struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseRequest) Descriptor

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

func (*CloseRequest) GetId

func (m *CloseRequest) GetId() int64

func (*CloseRequest) ProtoMessage

func (*CloseRequest) ProtoMessage()

func (*CloseRequest) Reset

func (m *CloseRequest) Reset()

func (*CloseRequest) String

func (m *CloseRequest) String() string

func (*CloseRequest) XXX_DiscardUnknown

func (m *CloseRequest) XXX_DiscardUnknown()

func (*CloseRequest) XXX_Marshal

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

func (*CloseRequest) XXX_Merge

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

func (*CloseRequest) XXX_Size

func (m *CloseRequest) XXX_Size() int

func (*CloseRequest) XXX_Unmarshal

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

type CloseResponse

type CloseResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CloseResponse) Descriptor

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

func (*CloseResponse) ProtoMessage

func (*CloseResponse) ProtoMessage()

func (*CloseResponse) Reset

func (m *CloseResponse) Reset()

func (*CloseResponse) String

func (m *CloseResponse) String() string

func (*CloseResponse) XXX_DiscardUnknown

func (m *CloseResponse) XXX_DiscardUnknown()

func (*CloseResponse) XXX_Marshal

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

func (*CloseResponse) XXX_Merge

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

func (*CloseResponse) XXX_Size

func (m *CloseResponse) XXX_Size() int

func (*CloseResponse) XXX_Unmarshal

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

type FileClient

type FileClient interface {
	Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error)
	Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
	Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error)
}

FileClient is the client API for File service.

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

func NewFileClient

func NewFileClient(cc *grpc.ClientConn) FileClient

type FileServer

FileServer is the server API for File service.

type FileService

type FileService interface {
	Open(ctx context.Context, in *OpenRequest, opts ...client.CallOption) (*OpenResponse, error)
	Stat(ctx context.Context, in *StatRequest, opts ...client.CallOption) (*StatResponse, error)
	Read(ctx context.Context, in *ReadRequest, opts ...client.CallOption) (*ReadResponse, error)
	Write(ctx context.Context, in *WriteRequest, opts ...client.CallOption) (*WriteResponse, error)
	Close(ctx context.Context, in *CloseRequest, opts ...client.CallOption) (*CloseResponse, error)
}

func NewFileService

func NewFileService(name string, c client.Client) FileService

type GetRequest

type GetRequest struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	BlockId              int64    `protobuf:"varint,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) GetBlockId

func (m *GetRequest) GetBlockId() int64

func (*GetRequest) GetId

func (m *GetRequest) GetId() int64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

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

func (*GetRequest) XXX_Merge

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

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

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

type GetResponse

type GetResponse struct {
	BlockId              int64    `protobuf:"varint,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"`
	Size                 int64    `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetResponse) Descriptor

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

func (*GetResponse) GetBlockId

func (m *GetResponse) GetBlockId() int64

func (*GetResponse) GetData

func (m *GetResponse) GetData() []byte

func (*GetResponse) GetSize

func (m *GetResponse) GetSize() int64

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) Reset

func (m *GetResponse) Reset()

func (*GetResponse) String

func (m *GetResponse) String() string

func (*GetResponse) XXX_DiscardUnknown

func (m *GetResponse) XXX_DiscardUnknown()

func (*GetResponse) XXX_Marshal

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

func (*GetResponse) XXX_Merge

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

func (*GetResponse) XXX_Size

func (m *GetResponse) XXX_Size() int

func (*GetResponse) XXX_Unmarshal

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

type OpenRequest

type OpenRequest struct {
	Filename             string   `protobuf:"bytes,1,opt,name=filename,proto3" json:"filename,omitempty"`
	Truncate             bool     `protobuf:"varint,2,opt,name=truncate,proto3" json:"truncate,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OpenRequest) Descriptor

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

func (*OpenRequest) GetFilename

func (m *OpenRequest) GetFilename() string

func (*OpenRequest) GetTruncate

func (m *OpenRequest) GetTruncate() bool

func (*OpenRequest) ProtoMessage

func (*OpenRequest) ProtoMessage()

func (*OpenRequest) Reset

func (m *OpenRequest) Reset()

func (*OpenRequest) String

func (m *OpenRequest) String() string

func (*OpenRequest) XXX_DiscardUnknown

func (m *OpenRequest) XXX_DiscardUnknown()

func (*OpenRequest) XXX_Marshal

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

func (*OpenRequest) XXX_Merge

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

func (*OpenRequest) XXX_Size

func (m *OpenRequest) XXX_Size() int

func (*OpenRequest) XXX_Unmarshal

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

type OpenResponse

type OpenResponse struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Result               bool     `protobuf:"varint,2,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*OpenResponse) Descriptor

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

func (*OpenResponse) GetId

func (m *OpenResponse) GetId() int64

func (*OpenResponse) GetResult

func (m *OpenResponse) GetResult() bool

func (*OpenResponse) ProtoMessage

func (*OpenResponse) ProtoMessage()

func (*OpenResponse) Reset

func (m *OpenResponse) Reset()

func (*OpenResponse) String

func (m *OpenResponse) String() string

func (*OpenResponse) XXX_DiscardUnknown

func (m *OpenResponse) XXX_DiscardUnknown()

func (*OpenResponse) XXX_Marshal

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

func (*OpenResponse) XXX_Merge

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

func (*OpenResponse) XXX_Size

func (m *OpenResponse) XXX_Size() int

func (*OpenResponse) XXX_Unmarshal

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

type ReadRequest

type ReadRequest struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Offset               int64    `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Size                 int64    `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadRequest) Descriptor

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

func (*ReadRequest) GetId

func (m *ReadRequest) GetId() int64

func (*ReadRequest) GetOffset

func (m *ReadRequest) GetOffset() int64

func (*ReadRequest) GetSize

func (m *ReadRequest) GetSize() int64

func (*ReadRequest) ProtoMessage

func (*ReadRequest) ProtoMessage()

func (*ReadRequest) Reset

func (m *ReadRequest) Reset()

func (*ReadRequest) String

func (m *ReadRequest) String() string

func (*ReadRequest) XXX_DiscardUnknown

func (m *ReadRequest) XXX_DiscardUnknown()

func (*ReadRequest) XXX_Marshal

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

func (*ReadRequest) XXX_Merge

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

func (*ReadRequest) XXX_Size

func (m *ReadRequest) XXX_Size() int

func (*ReadRequest) XXX_Unmarshal

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

type ReadResponse

type ReadResponse struct {
	Size                 int64    `protobuf:"varint,1,opt,name=size,proto3" json:"size,omitempty"`
	Data                 []byte   `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Eof                  bool     `protobuf:"varint,3,opt,name=eof,proto3" json:"eof,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ReadResponse) Descriptor

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

func (*ReadResponse) GetData

func (m *ReadResponse) GetData() []byte

func (*ReadResponse) GetEof

func (m *ReadResponse) GetEof() bool

func (*ReadResponse) GetSize

func (m *ReadResponse) GetSize() int64

func (*ReadResponse) ProtoMessage

func (*ReadResponse) ProtoMessage()

func (*ReadResponse) Reset

func (m *ReadResponse) Reset()

func (*ReadResponse) String

func (m *ReadResponse) String() string

func (*ReadResponse) XXX_DiscardUnknown

func (m *ReadResponse) XXX_DiscardUnknown()

func (*ReadResponse) XXX_Marshal

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

func (*ReadResponse) XXX_Merge

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

func (*ReadResponse) XXX_Size

func (m *ReadResponse) XXX_Size() int

func (*ReadResponse) XXX_Unmarshal

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

type StatRequest

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

func (*StatRequest) Descriptor

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

func (*StatRequest) GetFilename

func (m *StatRequest) GetFilename() string

func (*StatRequest) ProtoMessage

func (*StatRequest) ProtoMessage()

func (*StatRequest) Reset

func (m *StatRequest) Reset()

func (*StatRequest) String

func (m *StatRequest) String() string

func (*StatRequest) XXX_DiscardUnknown

func (m *StatRequest) XXX_DiscardUnknown()

func (*StatRequest) XXX_Marshal

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

func (*StatRequest) XXX_Merge

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

func (*StatRequest) XXX_Size

func (m *StatRequest) XXX_Size() int

func (*StatRequest) XXX_Unmarshal

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

type StatResponse

type StatResponse struct {
	Type                 string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Size                 int64    `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
	LastModified         int64    `protobuf:"varint,3,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*StatResponse) Descriptor

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

func (*StatResponse) GetLastModified

func (m *StatResponse) GetLastModified() int64

func (*StatResponse) GetSize

func (m *StatResponse) GetSize() int64

func (*StatResponse) GetType

func (m *StatResponse) GetType() string

func (*StatResponse) ProtoMessage

func (*StatResponse) ProtoMessage()

func (*StatResponse) Reset

func (m *StatResponse) Reset()

func (*StatResponse) String

func (m *StatResponse) String() string

func (*StatResponse) XXX_DiscardUnknown

func (m *StatResponse) XXX_DiscardUnknown()

func (*StatResponse) XXX_Marshal

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

func (*StatResponse) XXX_Merge

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

func (*StatResponse) XXX_Size

func (m *StatResponse) XXX_Size() int

func (*StatResponse) XXX_Unmarshal

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

type UnimplementedFileServer

type UnimplementedFileServer struct {
}

UnimplementedFileServer can be embedded to have forward compatible implementations.

func (*UnimplementedFileServer) Close

func (*UnimplementedFileServer) Open

func (*UnimplementedFileServer) Read

func (*UnimplementedFileServer) Stat

func (*UnimplementedFileServer) Write

type WriteRequest

type WriteRequest struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Offset               int64    `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WriteRequest) Descriptor

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

func (*WriteRequest) GetData

func (m *WriteRequest) GetData() []byte

func (*WriteRequest) GetId

func (m *WriteRequest) GetId() int64

func (*WriteRequest) GetOffset

func (m *WriteRequest) GetOffset() int64

func (*WriteRequest) ProtoMessage

func (*WriteRequest) ProtoMessage()

func (*WriteRequest) Reset

func (m *WriteRequest) Reset()

func (*WriteRequest) String

func (m *WriteRequest) String() string

func (*WriteRequest) XXX_DiscardUnknown

func (m *WriteRequest) XXX_DiscardUnknown()

func (*WriteRequest) XXX_Marshal

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

func (*WriteRequest) XXX_Merge

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

func (*WriteRequest) XXX_Size

func (m *WriteRequest) XXX_Size() int

func (*WriteRequest) XXX_Unmarshal

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

type WriteResponse

type WriteResponse struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*WriteResponse) Descriptor

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

func (*WriteResponse) ProtoMessage

func (*WriteResponse) ProtoMessage()

func (*WriteResponse) Reset

func (m *WriteResponse) Reset()

func (*WriteResponse) String

func (m *WriteResponse) String() string

func (*WriteResponse) XXX_DiscardUnknown

func (m *WriteResponse) XXX_DiscardUnknown()

func (*WriteResponse) XXX_Marshal

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

func (*WriteResponse) XXX_Merge

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

func (*WriteResponse) XXX_Size

func (m *WriteResponse) XXX_Size() int

func (*WriteResponse) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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