func CreateLocalChannel(port, maxConcurrency int, conn *grpc.ClientConn, spec config.TracingSpec, maxRequestBodySize int, readBufferSize int) *Channel {
	c := &Channel{
		client:             conn,
		baseAddress:        fmt.Sprintf("%s:%d", channel.DefaultChannelAddress, port),
		tracingSpec:        spec,
		appMetadataToken:   auth.GetAppToken(),
		maxRequestBodySize: maxRequestBodySize,
		readBufferSize:     readBufferSize,
	}
	if maxConcurrency > 0 {
		c.ch = make(chan int, maxConcurrency)
	}
	return c
}
CreateLocalChannel creates a gRPC connection with user code.
package grpc
import (
	"context"
	"fmt"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/metadata"
	"google.golang.org/grpc/status"
	"github.com/dapr/dapr/pkg/channel"
	"github.com/dapr/dapr/pkg/config"
	invokev1 "github.com/dapr/dapr/pkg/messaging/v1"
	internalv1pb "github.com/dapr/dapr/pkg/proto/internals/v1"
	runtimev1pb "github.com/dapr/dapr/pkg/proto/runtime/v1"
	auth "github.com/dapr/dapr/pkg/runtime/security"
)
type Channel struct {
	client             *grpc.ClientConn
	baseAddress        string
	ch                 chan int
	tracingSpec        config.TracingSpec
	appMetadataToken   string
	maxRequestBodySize int
	readBufferSize     int
}