// Code generated by protoc-gen-go.
// source: collectd.proto
// DO NOT EDIT!

/*
Package proto is a generated protocol buffer package.

It is generated from these files:
	collectd.proto

It has these top-level messages:
	PutValuesRequest
	PutValuesResponse
	QueryValuesRequest
	QueryValuesResponse
*/
package proto

import proto1 "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import collectd_types "collectd.org/rpc/proto/types"

import (
	context "golang.org/x/net/context"
	grpc "google.golang.org/grpc"
)

// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.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 _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package

// The arguments to PutValues.
type PutValuesRequest struct {
	// value_list is the metric to be sent to the server.
	ValueList *collectd_types.ValueList `protobuf:"bytes,1,opt,name=value_list,json=valueList" json:"value_list,omitempty"`
}

func (m *PutValuesRequest) Reset()                    { *m = PutValuesRequest{} }
func (m *PutValuesRequest) String() string            { return proto1.CompactTextString(m) }
func (*PutValuesRequest) ProtoMessage()               {}
func (*PutValuesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }

func (m *PutValuesRequest) GetValueList() *collectd_types.ValueList {
	if m != nil {
		return m.ValueList
	}
	return nil
}

// The response from PutValues.
type PutValuesResponse struct {
}

func (m *PutValuesResponse) Reset()                    { *m = PutValuesResponse{} }
func (m *PutValuesResponse) String() string            { return proto1.CompactTextString(m) }
func (*PutValuesResponse) ProtoMessage()               {}
func (*PutValuesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }

// The arguments to QueryValues.
type QueryValuesRequest struct {
	// Query by the fields of the identifier. Only return values matching the
	// specified shell wildcard patterns (see fnmatch(3)). Use '*' to match
	// any value.
	Identifier *collectd_types.Identifier `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"`
}

func (m *QueryValuesRequest) Reset()                    { *m = QueryValuesRequest{} }
func (m *QueryValuesRequest) String() string            { return proto1.CompactTextString(m) }
func (*QueryValuesRequest) ProtoMessage()               {}
func (*QueryValuesRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }

func (m *QueryValuesRequest) GetIdentifier() *collectd_types.Identifier {
	if m != nil {
		return m.Identifier
	}
	return nil
}

// The response from QueryValues.
type QueryValuesResponse struct {
	ValueList *collectd_types.ValueList `protobuf:"bytes,1,opt,name=value_list,json=valueList" json:"value_list,omitempty"`
}

func (m *QueryValuesResponse) Reset()                    { *m = QueryValuesResponse{} }
func (m *QueryValuesResponse) String() string            { return proto1.CompactTextString(m) }
func (*QueryValuesResponse) ProtoMessage()               {}
func (*QueryValuesResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }

func (m *QueryValuesResponse) GetValueList() *collectd_types.ValueList {
	if m != nil {
		return m.ValueList
	}
	return nil
}

func init() {
	proto1.RegisterType((*PutValuesRequest)(nil), "collectd.PutValuesRequest")
	proto1.RegisterType((*PutValuesResponse)(nil), "collectd.PutValuesResponse")
	proto1.RegisterType((*QueryValuesRequest)(nil), "collectd.QueryValuesRequest")
	proto1.RegisterType((*QueryValuesResponse)(nil), "collectd.QueryValuesResponse")
}

// 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

// Client API for Collectd service

type CollectdClient interface {
	// PutValues reads the value lists from the PutValuesRequest stream.
	// The gRPC server embedded into collectd will inject them into the system
	// just like the network plugin.
	PutValues(ctx context.Context, opts ...grpc.CallOption) (Collectd_PutValuesClient, error)
	// QueryValues returns a stream of matching value lists from collectd's
	// internal cache.
	QueryValues(ctx context.Context, in *QueryValuesRequest, opts ...grpc.CallOption) (Collectd_QueryValuesClient, error)
}

type collectdClient struct {
	cc *grpc.ClientConn
}

func NewCollectdClient(cc *grpc.ClientConn) CollectdClient {
	return &collectdClient{cc}
}

func (c *collectdClient) PutValues(ctx context.Context, opts ...grpc.CallOption) (Collectd_PutValuesClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Collectd_serviceDesc.Streams[0], c.cc, "/collectd.Collectd/PutValues", opts...)
	if err != nil {
		return nil, err
	}
	x := &collectdPutValuesClient{stream}
	return x, nil
}

type Collectd_PutValuesClient interface {
	Send(*PutValuesRequest) error
	CloseAndRecv() (*PutValuesResponse, error)
	grpc.ClientStream
}

type collectdPutValuesClient struct {
	grpc.ClientStream
}

func (x *collectdPutValuesClient) Send(m *PutValuesRequest) error {
	return x.ClientStream.SendMsg(m)
}

func (x *collectdPutValuesClient) CloseAndRecv() (*PutValuesResponse, error) {
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	m := new(PutValuesResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func (c *collectdClient) QueryValues(ctx context.Context, in *QueryValuesRequest, opts ...grpc.CallOption) (Collectd_QueryValuesClient, error) {
	stream, err := grpc.NewClientStream(ctx, &_Collectd_serviceDesc.Streams[1], c.cc, "/collectd.Collectd/QueryValues", opts...)
	if err != nil {
		return nil, err
	}
	x := &collectdQueryValuesClient{stream}
	if err := x.ClientStream.SendMsg(in); err != nil {
		return nil, err
	}
	if err := x.ClientStream.CloseSend(); err != nil {
		return nil, err
	}
	return x, nil
}

type Collectd_QueryValuesClient interface {
	Recv() (*QueryValuesResponse, error)
	grpc.ClientStream
}

type collectdQueryValuesClient struct {
	grpc.ClientStream
}

func (x *collectdQueryValuesClient) Recv() (*QueryValuesResponse, error) {
	m := new(QueryValuesResponse)
	if err := x.ClientStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

// Server API for Collectd service

type CollectdServer interface {
	// PutValues reads the value lists from the PutValuesRequest stream.
	// The gRPC server embedded into collectd will inject them into the system
	// just like the network plugin.
	PutValues(Collectd_PutValuesServer) error
	// QueryValues returns a stream of matching value lists from collectd's
	// internal cache.
	QueryValues(*QueryValuesRequest, Collectd_QueryValuesServer) error
}

func RegisterCollectdServer(s *grpc.Server, srv CollectdServer) {
	s.RegisterService(&_Collectd_serviceDesc, srv)
}

func _Collectd_PutValues_Handler(srv interface{}, stream grpc.ServerStream) error {
	return srv.(CollectdServer).PutValues(&collectdPutValuesServer{stream})
}

type Collectd_PutValuesServer interface {
	SendAndClose(*PutValuesResponse) error
	Recv() (*PutValuesRequest, error)
	grpc.ServerStream
}

type collectdPutValuesServer struct {
	grpc.ServerStream
}

func (x *collectdPutValuesServer) SendAndClose(m *PutValuesResponse) error {
	return x.ServerStream.SendMsg(m)
}

func (x *collectdPutValuesServer) Recv() (*PutValuesRequest, error) {
	m := new(PutValuesRequest)
	if err := x.ServerStream.RecvMsg(m); err != nil {
		return nil, err
	}
	return m, nil
}

func _Collectd_QueryValues_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(QueryValuesRequest)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(CollectdServer).QueryValues(m, &collectdQueryValuesServer{stream})
}

type Collectd_QueryValuesServer interface {
	Send(*QueryValuesResponse) error
	grpc.ServerStream
}

type collectdQueryValuesServer struct {
	grpc.ServerStream
}

func (x *collectdQueryValuesServer) Send(m *QueryValuesResponse) error {
	return x.ServerStream.SendMsg(m)
}

var _Collectd_serviceDesc = grpc.ServiceDesc{
	ServiceName: "collectd.Collectd",
	HandlerType: (*CollectdServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "PutValues",
			Handler:       _Collectd_PutValues_Handler,
			ClientStreams: true,
		},
		{
			StreamName:    "QueryValues",
			Handler:       _Collectd_QueryValues_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "collectd.proto",
}

func init() { proto1.RegisterFile("collectd.proto", fileDescriptor0) }

var fileDescriptor0 = []byte{
	// 238 bytes of a gzipped FileDescriptorProto
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00,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,
	0x35, 0x66, 0x70, 0x48, 0xc9, 0xe2, 0x90, 0x85, 0x98, 0x66, 0xc0, 0xe8, 0x24, 0x11, 0x25, 0x06,
	0x57, 0x91, 0x5f, 0x94, 0xae, 0x5f, 0x54, 0x90, 0xac, 0x0f, 0x8e, 0xc2, 0x24, 0x36, 0x30, 0x65,
	0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0xde, 0xc9, 0x28, 0x16, 0xf2, 0x01, 0x00, 0x00,
}
