proxy

package
v0.0.0-...-b63aa1a Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterService

func RegisterService(s giraffe_micro.Server, srv Service)

Types

type Client

type Client interface {
	Get(ctx context.Context, in *GetRequest) (*types.Struct, error)
	ListEvent(ctx context.Context, in *ListEventRequest) (*types.Struct, error)
}

Client is the client API for proxy service.

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

func NewClient

func NewClient(c giraffe_micro.Client) Client

type GetRequest

type GetRequest struct {
	//
	//集群 id
	ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId" form:"clusterId"`
	//
	//请求 uri
	Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri" form:"uri"`
	//
	//按字段筛选,如 involvedObject.name=nginx,involvedObject.kind=Deployment
	FieldSelector string `protobuf:"bytes,3,opt,name=fieldSelector,proto3" json:"fieldSelector" form:"fieldSelector"`
	//
	//按标签筛选,如:label1=123,label2=234
	LabelSelector        string   `protobuf:"bytes,4,opt,name=labelSelector,proto3" json:"labelSelector" form:"labelSelector"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Get请求

func (*GetRequest) Descriptor

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

func (*GetRequest) GetClusterId

func (m *GetRequest) GetClusterId() string

func (*GetRequest) GetFieldSelector

func (m *GetRequest) GetFieldSelector() string

func (*GetRequest) GetLabelSelector

func (m *GetRequest) GetLabelSelector() string

func (*GetRequest) GetUri

func (m *GetRequest) GetUri() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) Validate

func (this *GetRequest) Validate() error

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 GetResponseWrapper

type GetResponseWrapper struct {
	//
	//返回码
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"`
	//
	//返回码解释
	CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"`
	//
	//错误详情
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"`
	//
	//返回数据
	Data                 *types.Struct `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

GetApi返回

func (*GetResponseWrapper) Descriptor

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

func (*GetResponseWrapper) GetCode

func (m *GetResponseWrapper) GetCode() int32

func (*GetResponseWrapper) GetCodeExplain

func (m *GetResponseWrapper) GetCodeExplain() string

func (*GetResponseWrapper) GetData

func (m *GetResponseWrapper) GetData() *types.Struct

func (*GetResponseWrapper) GetError

func (m *GetResponseWrapper) GetError() string

func (*GetResponseWrapper) ProtoMessage

func (*GetResponseWrapper) ProtoMessage()

func (*GetResponseWrapper) Reset

func (m *GetResponseWrapper) Reset()

func (*GetResponseWrapper) String

func (m *GetResponseWrapper) String() string

func (*GetResponseWrapper) Validate

func (this *GetResponseWrapper) Validate() error

func (*GetResponseWrapper) XXX_DiscardUnknown

func (m *GetResponseWrapper) XXX_DiscardUnknown()

func (*GetResponseWrapper) XXX_Marshal

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

func (*GetResponseWrapper) XXX_Merge

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

func (*GetResponseWrapper) XXX_Size

func (m *GetResponseWrapper) XXX_Size() int

func (*GetResponseWrapper) XXX_Unmarshal

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

type ListEventRequest

type ListEventRequest struct {
	//
	//集群 id
	ClusterId string `protobuf:"bytes,1,opt,name=clusterId,proto3" json:"clusterId" form:"clusterId"`
	//
	//名称空间
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace" form:"namespace"`
	//
	//按字段筛选,如 involvedObject.name=nginx,involvedObject.kind=Deployment
	FieldSelector string `protobuf:"bytes,3,opt,name=fieldSelector,proto3" json:"fieldSelector" form:"fieldSelector"`
	//
	//按标签筛选,如:label1=123,label2=234
	LabelSelector        string   `protobuf:"bytes,4,opt,name=labelSelector,proto3" json:"labelSelector" form:"labelSelector"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

ListEvent请求

func (*ListEventRequest) Descriptor

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

func (*ListEventRequest) GetClusterId

func (m *ListEventRequest) GetClusterId() string

func (*ListEventRequest) GetFieldSelector

func (m *ListEventRequest) GetFieldSelector() string

func (*ListEventRequest) GetLabelSelector

func (m *ListEventRequest) GetLabelSelector() string

func (*ListEventRequest) GetNamespace

func (m *ListEventRequest) GetNamespace() string

func (*ListEventRequest) ProtoMessage

func (*ListEventRequest) ProtoMessage()

func (*ListEventRequest) Reset

func (m *ListEventRequest) Reset()

func (*ListEventRequest) String

func (m *ListEventRequest) String() string

func (*ListEventRequest) Validate

func (this *ListEventRequest) Validate() error

func (*ListEventRequest) XXX_DiscardUnknown

func (m *ListEventRequest) XXX_DiscardUnknown()

func (*ListEventRequest) XXX_Marshal

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

func (*ListEventRequest) XXX_Merge

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

func (*ListEventRequest) XXX_Size

func (m *ListEventRequest) XXX_Size() int

func (*ListEventRequest) XXX_Unmarshal

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

type ListEventResponseWrapper

type ListEventResponseWrapper struct {
	//
	//返回码
	Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code" form:"code"`
	//
	//返回码解释
	CodeExplain string `protobuf:"bytes,2,opt,name=codeExplain,proto3" json:"codeExplain" form:"codeExplain"`
	//
	//错误详情
	Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error" form:"error"`
	//
	//返回数据
	Data                 *types.Struct `protobuf:"bytes,4,opt,name=data,proto3" json:"data" form:"data"`
	XXX_NoUnkeyedLiteral struct{}      `json:"-"`
	XXX_unrecognized     []byte        `json:"-"`
	XXX_sizecache        int32         `json:"-"`
}

ListEventApi返回

func (*ListEventResponseWrapper) Descriptor

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

func (*ListEventResponseWrapper) GetCode

func (m *ListEventResponseWrapper) GetCode() int32

func (*ListEventResponseWrapper) GetCodeExplain

func (m *ListEventResponseWrapper) GetCodeExplain() string

func (*ListEventResponseWrapper) GetData

func (m *ListEventResponseWrapper) GetData() *types.Struct

func (*ListEventResponseWrapper) GetError

func (m *ListEventResponseWrapper) GetError() string

func (*ListEventResponseWrapper) ProtoMessage

func (*ListEventResponseWrapper) ProtoMessage()

func (*ListEventResponseWrapper) Reset

func (m *ListEventResponseWrapper) Reset()

func (*ListEventResponseWrapper) String

func (m *ListEventResponseWrapper) String() string

func (*ListEventResponseWrapper) Validate

func (this *ListEventResponseWrapper) Validate() error

func (*ListEventResponseWrapper) XXX_DiscardUnknown

func (m *ListEventResponseWrapper) XXX_DiscardUnknown()

func (*ListEventResponseWrapper) XXX_Marshal

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

func (*ListEventResponseWrapper) XXX_Merge

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

func (*ListEventResponseWrapper) XXX_Size

func (m *ListEventResponseWrapper) XXX_Size() int

func (*ListEventResponseWrapper) XXX_Unmarshal

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

type Service

type Service interface {
	Get(context.Context, *GetRequest) (*types.Struct, error)
	ListEvent(context.Context, *ListEventRequest) (*types.Struct, error)
}

Service is the server API for proxy service.

Jump to

Keyboard shortcuts

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