<commit_before>package service

import (
    "fmt"
    "time"

    "golang.org/x/net/context"

    "github.com/servicekit/servicekit-go/coordinator"
    "github.com/servicekit/servicekit-go/logger"
    "github.com/servicekit/servicekit-go/spec"
)

type GRPCServer interface {
    Serve(ctx context.Context, network, addr, pem, key string) error
}

type GRPCService struct {
    ID      string
    Service string
    Tags    []string
    Address string
    Port    int

    server GRPCServer
    pem    string
    key    string

    TTL time.Duration

    c coordinator.Coordinator

    log *logger.Logger

    errorChan chan error
}

func NewGRPCService(id string, service string, tags []string, address string, port int, server GRPCServer, pem, key string, ttl time.Duration, c coordinator.Coordinator, log *logger.Logger) *GRPCService {
    return &GRPCService{
        ID:      id,
        Service: service,
        Tags:    tags,
        Address: address,
        Port:    port,

        server: server,
        pem:    pem,
        key:    key,

        TTL: ttl,
        c:   c,
        log: log,

        errorChan: make(chan error),
    }
}

func (g *GRPCService) getService() spec.Service {
    return spec.Service{
        ID:      g.ID,
        Service: g.Service,
        Tags:    g.Tags,
        Address: g.Address,
        Port:    g.Port,
    }<commit_msg>update grpc<commit_after>package service

import (
    "fmt"
    "time"

    "golang.org/x/net/context"

    "github.com/servicekit/servicekit-go/coordinator"
    "github.com/servicekit/servicekit-go/logger"
    "github.com/servicekit/servicekit-go/spec"
)

type GRPCServer interface {
    Serve(ctx context.Context, network, addr, pem, key string) error
}

type GRPCService struct {
    ID      string
    Service string
    Tags    []string
    Address string
    Port    int

    server GRPCServer
    pem    string
    key    string

    TTL time.Duration

    c coordinator.Coordinator

    log *logger.Logger

    errorChan chan error
}

func NewGRPCService(id string, service string, tags []string, address string, port int, server GRPCServer, pem, key string, ttl time.Duration, c coordinator.Coordinator, log *logger.Logger) *GRPCService {
    return &GRPCService{
        ID:      id,
        Service: service,
        Tags:    tags,
        Address: address,
        Port:    port,

        server: server,
        pem:    pem,
        key:    key,

        TTL: ttl,
        c:   c,
        log: log,

        errorChan: make(chan error),
    }
}

func (g *GRPCService) getService() *spec.Service {
    return &spec.Service{
        ID:      g.ID,
        Service: g.Service,
        Tags:    g.Tags,
        Address: g.Address,
        Port:    g.Port,
    }
{'fraction_non_alphanumeric': 0.09409190371991247, 'fraction_numerical': 0.0, 'mean_word_length': 2.05456570155902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3776530', 'n_tokens_mistral': 899, 'n_tokens_neox': 857, 'n_words': 231}