// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc             v3.19.3
// source: shark.proto

package shark

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7

// VpcsharkClient is the client API for Vpcshark service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type VpcsharkClient interface {
	GetPackets(ctx context.Context, in *GetPacketsInput, opts ...grpc.CallOption) (Vpcshark_GetPacketsClient, error)
}

type vpcsharkClient struct {
	cc grpc.ClientConnInterface
}

func NewVpcsharkClient(cc grpc.ClientConnInterface) VpcsharkClient {
	return &vpcsharkClient{cc}
}

func (c *vpcsharkClient) GetPackets(ctx context.Context, in *GetPacketsInput, opts ...grpc.CallOption) (Vpcshark_GetPacketsClient, error) {
	stream, err := c.cc.NewStream(ctx, &Vpcshark_ServiceDesc.Streams[0], "/Vpcshark/GetPackets", opts...)
	if err != nil {
		return nil, err
	}
	x := &vpcsharkGetPacketsClient{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 Vpcshark_GetPacketsClient interface {
	Recv() (*GetPacketsOutput, error)
	grpc.ClientStream
}

type vpcsharkGetPacketsClient struct {
	grpc.ClientStream
}

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

// VpcsharkServer is the server API for Vpcshark service.
// All implementations must embed UnimplementedVpcsharkServer
// for forward compatibility
type VpcsharkServer interface {
	GetPackets(*GetPacketsInput, Vpcshark_GetPacketsServer) error
	mustEmbedUnimplementedVpcsharkServer()
}

// UnimplementedVpcsharkServer must be embedded to have forward compatible implementations.
type UnimplementedVpcsharkServer struct {
}

func (UnimplementedVpcsharkServer) GetPackets(*GetPacketsInput, Vpcshark_GetPacketsServer) error {
	return status.Errorf(codes.Unimplemented, "method GetPackets not implemented")
}
func (UnimplementedVpcsharkServer) mustEmbedUnimplementedVpcsharkServer() {}

// UnsafeVpcsharkServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VpcsharkServer will
// result in compilation errors.
type UnsafeVpcsharkServer interface {
	mustEmbedUnimplementedVpcsharkServer()
}

func RegisterVpcsharkServer(s grpc.ServiceRegistrar, srv VpcsharkServer) {
	s.RegisterService(&Vpcshark_ServiceDesc, srv)
}

func _Vpcshark_GetPackets_Handler(srv interface{}, stream grpc.ServerStream) error {
	m := new(GetPacketsInput)
	if err := stream.RecvMsg(m); err != nil {
		return err
	}
	return srv.(VpcsharkServer).GetPackets(m, &vpcsharkGetPacketsServer{stream})
}

type Vpcshark_GetPacketsServer interface {
	Send(*GetPacketsOutput) error
	grpc.ServerStream
}

type vpcsharkGetPacketsServer struct {
	grpc.ServerStream
}

func (x *vpcsharkGetPacketsServer) Send(m *GetPacketsOutput) error {
	return x.ServerStream.SendMsg(m)
}

// Vpcshark_ServiceDesc is the grpc.ServiceDesc for Vpcshark service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Vpcshark_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Vpcshark",
	HandlerType: (*VpcsharkServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetPackets",
			Handler:       _Vpcshark_GetPackets_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "shark.proto",
}
