moc/rpc/cloudagent/cloud/moc_cloudagent_cluster.pb.go

423 строки
15 KiB
Go

// Code generated by protoc-gen-go. DO NOT EDIT.
// source: moc_cloudagent_cluster.proto
package cloud
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
common "github.com/microsoft/moc/rpc/common"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type ClusterResponse struct {
Clusters []*Cluster `protobuf:"bytes,1,rep,name=Clusters,proto3" json:"Clusters,omitempty"`
Result *wrappers.BoolValue `protobuf:"bytes,2,opt,name=Result,proto3" json:"Result,omitempty"`
Error string `protobuf:"bytes,3,opt,name=Error,proto3" json:"Error,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterResponse) Reset() { *m = ClusterResponse{} }
func (m *ClusterResponse) String() string { return proto.CompactTextString(m) }
func (*ClusterResponse) ProtoMessage() {}
func (*ClusterResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_3cf76b1466679011, []int{0}
}
func (m *ClusterResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterResponse.Unmarshal(m, b)
}
func (m *ClusterResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClusterResponse.Marshal(b, m, deterministic)
}
func (m *ClusterResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterResponse.Merge(m, src)
}
func (m *ClusterResponse) XXX_Size() int {
return xxx_messageInfo_ClusterResponse.Size(m)
}
func (m *ClusterResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterResponse proto.InternalMessageInfo
func (m *ClusterResponse) GetClusters() []*Cluster {
if m != nil {
return m.Clusters
}
return nil
}
func (m *ClusterResponse) GetResult() *wrappers.BoolValue {
if m != nil {
return m.Result
}
return nil
}
func (m *ClusterResponse) GetError() string {
if m != nil {
return m.Error
}
return ""
}
type Cluster struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
Fqdn string `protobuf:"bytes,3,opt,name=fqdn,proto3" json:"fqdn,omitempty"`
Status *common.Status `protobuf:"bytes,4,opt,name=status,proto3" json:"status,omitempty"`
UserOwned bool `protobuf:"varint,5,opt,name=UserOwned,proto3" json:"UserOwned,omitempty"`
IsLocalCluster bool `protobuf:"varint,6,opt,name=IsLocalCluster,proto3" json:"IsLocalCluster,omitempty"`
Domain string `protobuf:"bytes,7,opt,name=domain,proto3" json:"domain,omitempty"`
Nodes []*Node `protobuf:"bytes,8,rep,name=Nodes,proto3" json:"Nodes,omitempty"`
LocationName string `protobuf:"bytes,9,opt,name=locationName,proto3" json:"locationName,omitempty"`
Tags *common.Tags `protobuf:"bytes,10,opt,name=tags,proto3" json:"tags,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Cluster) Reset() { *m = Cluster{} }
func (m *Cluster) String() string { return proto.CompactTextString(m) }
func (*Cluster) ProtoMessage() {}
func (*Cluster) Descriptor() ([]byte, []int) {
return fileDescriptor_3cf76b1466679011, []int{1}
}
func (m *Cluster) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Cluster.Unmarshal(m, b)
}
func (m *Cluster) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Cluster.Marshal(b, m, deterministic)
}
func (m *Cluster) XXX_Merge(src proto.Message) {
xxx_messageInfo_Cluster.Merge(m, src)
}
func (m *Cluster) XXX_Size() int {
return xxx_messageInfo_Cluster.Size(m)
}
func (m *Cluster) XXX_DiscardUnknown() {
xxx_messageInfo_Cluster.DiscardUnknown(m)
}
var xxx_messageInfo_Cluster proto.InternalMessageInfo
func (m *Cluster) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Cluster) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Cluster) GetFqdn() string {
if m != nil {
return m.Fqdn
}
return ""
}
func (m *Cluster) GetStatus() *common.Status {
if m != nil {
return m.Status
}
return nil
}
func (m *Cluster) GetUserOwned() bool {
if m != nil {
return m.UserOwned
}
return false
}
func (m *Cluster) GetIsLocalCluster() bool {
if m != nil {
return m.IsLocalCluster
}
return false
}
func (m *Cluster) GetDomain() string {
if m != nil {
return m.Domain
}
return ""
}
func (m *Cluster) GetNodes() []*Node {
if m != nil {
return m.Nodes
}
return nil
}
func (m *Cluster) GetLocationName() string {
if m != nil {
return m.LocationName
}
return ""
}
func (m *Cluster) GetTags() *common.Tags {
if m != nil {
return m.Tags
}
return nil
}
func init() {
proto.RegisterType((*ClusterResponse)(nil), "moc.cloudagent.cluster.ClusterResponse")
proto.RegisterType((*Cluster)(nil), "moc.cloudagent.cluster.Cluster")
}
func init() { proto.RegisterFile("moc_cloudagent_cluster.proto", fileDescriptor_3cf76b1466679011) }
var fileDescriptor_3cf76b1466679011 = []byte{
// 468 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xc6, 0x6e, 0xe2, 0xc6, 0x93, 0x52, 0xa4, 0x15, 0x2a, 0xdb, 0xa8, 0x40, 0x08, 0x12, 0xe4,
0x82, 0x2d, 0x85, 0x23, 0x27, 0x8a, 0x50, 0x85, 0x54, 0x15, 0x64, 0x28, 0xe2, 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
0xb9, 0xfd, 0x68, 0x37, 0x8a, 0xa7, 0xe9, 0xb7, 0x17, 0x45, 0xe9, 0x7e, 0xb4, 0xf3, 0x44, 0x62,
0x9d, 0xd6, 0xa5, 0x34, 0x68, 0x71, 0xe1, 0xd2, 0x1a, 0x65, 0x6a, 0x1a, 0x99, 0xae, 0xcb, 0xbb,
0x70, 0x1e, 0xd1, 0x27, 0xf1, 0xf2, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x08, 0xfb, 0x97, 0xb8,
0x0e, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ClusterAgentClient is the client API for ClusterAgent service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ClusterAgentClient interface {
LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error)
GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error)
}
type clusterAgentClient struct {
cc *grpc.ClientConn
}
func NewClusterAgentClient(cc *grpc.ClientConn) ClusterAgentClient {
return &clusterAgentClient{cc}
}
func (c *clusterAgentClient) LoadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
out := new(ClusterResponse)
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/LoadCluster", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clusterAgentClient) UnloadCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
out := new(ClusterResponse)
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clusterAgentClient) GetCluster(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*ClusterResponse, error) {
out := new(ClusterResponse)
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetCluster", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *clusterAgentClient) GetNodes(ctx context.Context, in *Cluster, opts ...grpc.CallOption) (*NodeResponse, error) {
out := new(NodeResponse)
err := c.cc.Invoke(ctx, "/moc.cloudagent.cluster.ClusterAgent/GetNodes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ClusterAgentServer is the server API for ClusterAgent service.
type ClusterAgentServer interface {
LoadCluster(context.Context, *Cluster) (*ClusterResponse, error)
UnloadCluster(context.Context, *Cluster) (*ClusterResponse, error)
GetCluster(context.Context, *Cluster) (*ClusterResponse, error)
GetNodes(context.Context, *Cluster) (*NodeResponse, error)
}
// UnimplementedClusterAgentServer can be embedded to have forward compatible implementations.
type UnimplementedClusterAgentServer struct {
}
func (*UnimplementedClusterAgentServer) LoadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method LoadCluster not implemented")
}
func (*UnimplementedClusterAgentServer) UnloadCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UnloadCluster not implemented")
}
func (*UnimplementedClusterAgentServer) GetCluster(ctx context.Context, req *Cluster) (*ClusterResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetCluster not implemented")
}
func (*UnimplementedClusterAgentServer) GetNodes(ctx context.Context, req *Cluster) (*NodeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetNodes not implemented")
}
func RegisterClusterAgentServer(s *grpc.Server, srv ClusterAgentServer) {
s.RegisterService(&_ClusterAgent_serviceDesc, srv)
}
func _ClusterAgent_LoadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Cluster)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterAgentServer).LoadCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/LoadCluster",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterAgentServer).LoadCluster(ctx, req.(*Cluster))
}
return interceptor(ctx, in, info, handler)
}
func _ClusterAgent_UnloadCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Cluster)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterAgentServer).UnloadCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/UnloadCluster",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterAgentServer).UnloadCluster(ctx, req.(*Cluster))
}
return interceptor(ctx, in, info, handler)
}
func _ClusterAgent_GetCluster_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Cluster)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterAgentServer).GetCluster(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetCluster",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterAgentServer).GetCluster(ctx, req.(*Cluster))
}
return interceptor(ctx, in, info, handler)
}
func _ClusterAgent_GetNodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Cluster)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ClusterAgentServer).GetNodes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/moc.cloudagent.cluster.ClusterAgent/GetNodes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ClusterAgentServer).GetNodes(ctx, req.(*Cluster))
}
return interceptor(ctx, in, info, handler)
}
var _ClusterAgent_serviceDesc = grpc.ServiceDesc{
ServiceName: "moc.cloudagent.cluster.ClusterAgent",
HandlerType: (*ClusterAgentServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "LoadCluster",
Handler: _ClusterAgent_LoadCluster_Handler,
},
{
MethodName: "UnloadCluster",
Handler: _ClusterAgent_UnloadCluster_Handler,
},
{
MethodName: "GetCluster",
Handler: _ClusterAgent_GetCluster_Handler,
},
{
MethodName: "GetNodes",
Handler: _ClusterAgent_GetNodes_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "moc_cloudagent_cluster.proto",
}