k3s/vendor/github.com/k3s-io/kine/pkg/server/lease.go
Jacob Blain Christen 36230daa86
[migration k3s-io] update kine dependency (#2568)
rancher/kine ➡️ k3s-io/kine

Part of https://github.com/rancher/k3s/issues/2189

Signed-off-by: Jacob Blain Christen <jacob@rancher.com>
2020-11-30 16:45:22 -07:00

33 lines
1.1 KiB
Go

package server
import (
"context"
"fmt"
"go.etcd.io/etcd/etcdserver/etcdserverpb"
)
func (s *KVServerBridge) LeaseGrant(ctx context.Context, req *etcdserverpb.LeaseGrantRequest) (*etcdserverpb.LeaseGrantResponse, error) {
return &etcdserverpb.LeaseGrantResponse{
Header: &etcdserverpb.ResponseHeader{},
ID: req.TTL,
TTL: req.TTL,
}, nil
}
func (s *KVServerBridge) LeaseRevoke(context.Context, *etcdserverpb.LeaseRevokeRequest) (*etcdserverpb.LeaseRevokeResponse, error) {
return nil, fmt.Errorf("lease revoke is not supported")
}
func (s *KVServerBridge) LeaseKeepAlive(etcdserverpb.Lease_LeaseKeepAliveServer) error {
return fmt.Errorf("lease keep alive is not supported")
}
func (s *KVServerBridge) LeaseTimeToLive(context.Context, *etcdserverpb.LeaseTimeToLiveRequest) (*etcdserverpb.LeaseTimeToLiveResponse, error) {
return nil, fmt.Errorf("lease time to live is not supported")
}
func (s *KVServerBridge) LeaseLeases(context.Context, *etcdserverpb.LeaseLeasesRequest) (*etcdserverpb.LeaseLeasesResponse, error) {
return nil, fmt.Errorf("lease leases is not supported")
}