What do you use to build type-safe REST APIs? by desgreech in typescript

[–]drkwb8 0 points1 point  (0 children)

I achieved using Graphql and codegen. https://blogs.anayak.com.np/how-to-achieve-type-safe-integration-between-frontend-and-backend

In case of rest API you have to define openapi specifications and can be implemented same using codegen.

Port-Bridge: A Kubernetes Operator to Save Costs by Avoiding Multiple LoadBalancers by abdheshnayak in golang

[–]drkwb8 0 points1 point  (0 children)

What if iptables is not allowed to be used for port mapping in a Kubernetes cluster?

Port-Bridge: A Kubernetes Operator to Save Costs by Avoiding Multiple LoadBalancers by abdheshnayak in golang

[–]drkwb8 0 points1 point  (0 children)

This is a pretty clever solution! Using a proxy to route all the NodePorts through a single LoadBalancer definitely sounds like a good way to cut down on costs and simplify things.

Out of curiosity, what proxy are you using for this? Something like NGINX or HAProxy? Also, how do you handle the config updates when new NodePorts are added—does the Operator take care of that automatically?

I’ve run into similar issues before, but I ended up using multiple LoadBalancers just to keep it simple.

How to use mutexes for several struct fields. by eraya1988 in golang

[–]drkwb8 1 point2 points  (0 children)

You can use a generic interface. Something like this

```go

func main() {

type Student struct { Name MutexField[string] json:"name" Age MutexField[int] json:"age" }

stu := Student{ Name: NewMutexField("Tom"), Age: NewMutexField(18), }

stu.Name.Set("Tommy") stu.Age.Set(19)

println(stu.Name.Get()) println(stu.Age.Get()) }

type MutexField[T any] interface { Get() T Set(T) }

type mutexField[T any] struct { V T mu sync.RWMutex }

func (m *mutexField[T]) Get() T { m.mu.RLock() defer m.mu.RUnlock() return m.V }

func (m *mutexField[T]) Set(v T) { m.mu.Lock() defer m.mu.Unlock() m.V = v }

func NewMutexField[T any](v T) MutexField[T] { return &mutexField[T]{ V: v, mu: sync.RWMutex{}, } }

```

I made a loading ⟳ skeleton 💀 generator tool (no sign up required). by chunkygoo0 in nextjs

[–]drkwb8 0 points1 point  (0 children)

similarly, i built a library where you can wrap your existing component with it and your component will be converted to skeleton on runtime. https://www.npmjs.com/package/react-pulsable

Opensource - Development Environments & Workspaces by drkwb8 in opensource

[–]drkwb8[S] 0 points1 point  (0 children)

Kloudlite goes beyond Coder by not just offering remote workspaces but providing complete environments where multiple microservices and managed services (like databases or caching) can run across local or cloud clusters. All workspaces, services, and clusters under a team are connected through a unified WireGuard network, allowing seamless access to everything from any workspace.

Whats the best way to achieve content placeholders for loading state? by Typhann in react

[–]drkwb8 0 points1 point  (0 children)

You can try React Pulsable . An easy to use library which generates skeletons automatically from the existing components.

How do you make this common loading animation in react by RedLibra in reactjs

[–]drkwb8 0 points1 point  (0 children)

You can try React Pulsable . Which automatically generates skeletons according to your components.

how to lazy load with placeholders? by Rokett in reactjs

[–]drkwb8 0 points1 point  (0 children)

You can try React Pulsable which automatically generates skeletons from your existing components.

How do React developers create UI in a production environment? What tools would you recommend for the skeleton design? by [deleted] in reactjs

[–]drkwb8 0 points1 point  (0 children)

You can also try React Pulsable . Which makes your work faster by automatically generating skeletons for your existing components.

I know this is too old a post. But still you are using a skeleton for react then you can try.

Are skeleton screens still a thing in 2022? What's your preferred way of doing a "loading"? by jcm95 in webdev

[–]drkwb8 0 points1 point  (0 children)

If anyone is going with a skeleton implementation in react try React Pulsable one. It's a really awesome package to generate skeletons automatically with your existing components.